summaryrefslogtreecommitdiff
path: root/tests.as-root
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-09-13 15:39:07 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-09-13 15:39:07 +0100
commit2b82040f847a5595dccb80f8ed537e7d6c5a1e6e (patch)
tree4945051fca5c55c6e8672ad61f0c499916960121 /tests.as-root
parent90821e1e58317ae105bd2ecf43f46f441e292fcd (diff)
downloadmorph-2b82040f847a5595dccb80f8ed537e7d6c5a1e6e.tar.gz
Fix things so test suite works on Debian squeeze
This requires disabling the feature that retains the original order of fields in a morphlogy when it gets overwritten. The implementation relies on features that are not available in Python 2.6. We need to support Morph on Debian squeeze, for bootstrapping purposes, and therefore need to have it work with Python 2.6. However, the morphology rewriting is only relevant for system branching and merging, and that isn't needed for bootstrapping, so we disable the affected tests on Python 2.6.
Diffstat (limited to 'tests.as-root')
-rwxr-xr-xtests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script8
-rwxr-xr-xtests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script8
-rwxr-xr-xtests.as-root/building-a-system-branch-works-anywhere.script7
-rwxr-xr-xtests.as-root/setup2
4 files changed, 24 insertions, 1 deletions
diff --git a/tests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script b/tests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script
index ecb3b0e0..56fd08cf 100755
--- a/tests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script
+++ b/tests.as-root/building-a-system-branch-multiple-times-doesnt-generate-new-artifacts.script
@@ -19,6 +19,14 @@
set -eu
+# Disable test on versions of Python before 2.7.
+if ! python --version 2>&1 | grep '^Python 2\.[78]' > /dev/null
+then
+ name=building-a-system-branch-multiple-times-doesnt-generate-new-artifacts
+ cat "$SRCDIR/tests.as-root/$name.stdout"
+ exit 0
+fi
+
source "$SRCDIR/scripts/fix-committer-info"
# Initialise the workspace.
diff --git a/tests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script b/tests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script
index 002f4abd..0ba6ebad 100755
--- a/tests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script
+++ b/tests.as-root/building-a-system-branch-picks-up-uncommitted-changes.script
@@ -19,6 +19,14 @@
set -eu
+# Disable test on versions of Python before 2.7.
+if ! python --version 2>&1 | grep '^Python 2\.[78]' > /dev/null
+then
+ name="building-a-system-branch-picks-up-uncommitted-changes"
+ cat "$SRCDIR/tests.as-root/$name.stdout"
+ exit 0
+fi
+
source "$SRCDIR/scripts/fix-committer-info"
# Initialise the workspace.
diff --git a/tests.as-root/building-a-system-branch-works-anywhere.script b/tests.as-root/building-a-system-branch-works-anywhere.script
index 0d0b70b1..462963e0 100755
--- a/tests.as-root/building-a-system-branch-works-anywhere.script
+++ b/tests.as-root/building-a-system-branch-works-anywhere.script
@@ -19,6 +19,13 @@
set -eu
+# Disable test on versions of Python before 2.7.
+if ! python --version 2>&1 | grep '^Python 2\.[78]' > /dev/null
+then
+ cat "$SRCDIR/tests.as-root/building-a-system-branch-works-anywhere.stdout"
+ exit 0
+fi
+
source "$SRCDIR/scripts/fix-committer-info"
# Initialise the workspace.
diff --git a/tests.as-root/setup b/tests.as-root/setup
index 1392450e..cb3448a9 100755
--- a/tests.as-root/setup
+++ b/tests.as-root/setup
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Create git repositories for tests. The chunk repository will contain a
# simple "hello, world" C program, and two branches ("master", "farrokh"),