aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-24 18:00:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:35 +0200
commit79a83d6dd0f312a5e390f5627f68cc96c4427d33 (patch)
treef66a0a33ea9d18bf1e85d7c4503fc923028edc80 /tests
parent2c0a2b0d688b4450c72cde12ecedaa3fc3c9662a (diff)
Add support for setup/teardown commands
Diffstat (limited to 'tests')
-rw-r--r--tests/test/script/buildfile2
-rw-r--r--tests/test/script/integration/bootstrap.build4
-rw-r--r--tests/test/script/integration/buildfile7
-rw-r--r--tests/test/script/integration/testscript27
4 files changed, 39 insertions, 1 deletions
diff --git a/tests/test/script/buildfile b/tests/test/script/buildfile
index 2bc4780..e613013 100644
--- a/tests/test/script/buildfile
+++ b/tests/test/script/buildfile
@@ -2,6 +2,6 @@
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-d = runner/
+d = runner/ integration/
./: $d
include $d
diff --git a/tests/test/script/integration/bootstrap.build b/tests/test/script/integration/bootstrap.build
new file mode 100644
index 0000000..876be09
--- /dev/null
+++ b/tests/test/script/integration/bootstrap.build
@@ -0,0 +1,4 @@
+project = test
+amalgamation =
+
+using test
diff --git a/tests/test/script/integration/buildfile b/tests/test/script/integration/buildfile
new file mode 100644
index 0000000..9b7b906
--- /dev/null
+++ b/tests/test/script/integration/buildfile
@@ -0,0 +1,7 @@
+# file : tests/test/script/integration/buildfile
+# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+./: test{testscript}
+
+test{*}: test = $build.driver
diff --git a/tests/test/script/integration/testscript b/tests/test/script/integration/testscript
new file mode 100644
index 0000000..4c8c380
--- /dev/null
+++ b/tests/test/script/integration/testscript
@@ -0,0 +1,27 @@
+# file : tests/test/script/integration/testscript
+# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+test.options += --buildfile -
+test.arguments = test
+
++mkdir build
+#+cat <<EOI >>>build/boostrap.build
+#project = test
+#amalgamation =
+#
+#using test
+#EOI
++cp $src_base/bootstrap.build build/
+
+touch testscript foo.test;
+$* <<EOI 2>>EOE != 0;
+./: test{testscript foo}
+EOI
+error: both 'testscript' and other names specified for dir{./}
+info: while testing dir{./}
+EOE
+rm -f testscript foo.test
+
+-rm -f build/bootstrap.build
+-rmdir build/