[vala/wip/issue/1094: 1/2] tests: Use Automake’s parallel test driver to speed up running tests




commit 78600a6a0c221e08b1e32912b61042aa1f36775b
Author: Reuben Thomas <rrt sc3d org>
Date:   Tue Nov 3 23:11:34 2020 +0000

    tests: Use Automake’s parallel test driver to speed up running tests
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/1094

 Makefile.am                                        |   1 +
 {tests => build-aux}/testrunner.sh                 | 166 +++++++++++----------
 tests/.gitignore                                   |   2 +
 tests/Makefile.am                                  |  76 +++++-----
 tests/{posix => linux}/file-commandpipe.vala       |   0
 tests/linux/tests-extra-environment.sh             |   1 +
 tests/nullability/tests-extra-environment.sh       |   1 +
 tests/posix/arrays.vala                            |   1 +
 tests/posix/delegate_only.vala                     |   1 +
 tests/posix/empty-length-0.vala                    |   1 +
 tests/posix/enum_only.vala                         |   1 +
 tests/posix/struct_only.vala                       |   1 +
 tests/posix/tests-extra-environment.sh             |   2 +
 tests/version/tests-extra-environment.sh           |   1 +
 valadoc/tests/.gitignore                           |   2 +
 valadoc/tests/Makefile.am                          |  33 ++--
 ...ic-scanner.vala => parser-generic-scanner.vala} |   0
 .../{parser/manyrule.vala => parser-manyrule.vala} |   0
 .../oneofrule.vala => parser-oneofrule.vala}       |   0
 .../optionalrule.vala => parser-optionalrule.vala} |   0
 .../sequencerule.vala => parser-sequencerule.vala} |   0
 .../{parser/stubrule.vala => parser-stubrule.vala} |   0
 .../tests/libvaladoc/tests-extra-environment.sh    |  17 +++
 valadoc/tests/testrunner.sh                        | 154 -------------------
 24 files changed, 171 insertions(+), 290 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c96ea4e84..992f95f51 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,4 +100,5 @@ EXTRA_DIST = \
        .version \
        build-aux/git-version-gen \
        build-aux/gitlog-to-changelog \
+       build-aux/testrunner.sh \
        $(NULL)
diff --git a/tests/testrunner.sh b/build-aux/testrunner.sh
similarity index 67%
rename from tests/testrunner.sh
rename to build-aux/testrunner.sh
index ac5ffe1ad..a3363310b 100755
--- a/tests/testrunner.sh
+++ b/build-aux/testrunner.sh
@@ -20,14 +20,18 @@
 # Author:
 #      Jürg Billeter <j bitron ch>
 
-builddir=$PWD
-topbuilddir=$builddir/..
-srcdir=$PWD/`dirname $0`
-topsrcdir=$srcdir/..
-vapidir=$topsrcdir/vapi
+EXTRA_ENVIRONMENT_FILE=tests-extra-environment.sh
+
+testfile=$1
+testdirname="$(dirname $testfile)"
+if test -f $testdirname/$EXTRA_ENVIRONMENT_FILE; then
+       source $testdirname/$EXTRA_ENVIRONMENT_FILE
+fi
+
+vapidir=$abs_top_srcdir/vapi
 run_prefix=""
 
-VALAC=$topbuilddir/compiler/valac$EXEEXT
+VALAC=$abs_top_builddir/compiler/valac$EXEEXT
 VALAFLAGS="$VALAFLAGS \
        --vapidir $vapidir \
        --enable-checking \
@@ -39,7 +43,7 @@ VALAFLAGS="$VALAFLAGS \
        -X -pipe \
        -X -lm \
        -X -DGETTEXT_PACKAGE=\\\"valac\\\""
-VAPIGEN=$topbuilddir/vapigen/vapigen$EXEEXT
+VAPIGEN=$abs_top_builddir/vapigen/vapigen$EXEEXT
 VAPIGENFLAGS="--vapidir $vapidir"
 
 # Incorporate the TEST_CFLAGS.
@@ -142,12 +146,12 @@ function sourceend() {
        fi
 }
 
-testdir=_test
+testdir=_test.$$
 rm -rf $testdir
 mkdir $testdir
 cd $testdir
 
-echo -n -e "TEST: Preparing...\033[72G"
+echo -n -e "TEST: Preparing..."
 
 cat << "EOF" > checkall
 all=0
@@ -155,88 +159,87 @@ fail=0
 EOF
 
 PACKAGES=$([ -z "$PACKAGES" ] && echo "gio-2.0" || echo $PACKAGES)
-for testfile in "$@"; do
-       rm -f prepare check
-       echo 'set -e' >> prepare
-       run_prefix=""
+testfile=${testfile#$srcdir/}
+rm -f prepare check
+echo 'set -e' >> prepare
+run_prefix=""
 
-       case "$testfile" in
-       *.vala)
-               testpath=${testfile/.vala/}
-               ns=${testpath//\//_}
-               ns=${ns//-/_}
-               SOURCEFILE=$ns.vala
+case "$testfile" in
+*.vala)
+       testpath=${testfile/.vala/}
+       ns=${testpath//\//_}
+       ns=${ns//-/_}
+       SOURCEFILE=$ns.vala
 
-               cat "$srcdir/$testfile" >> $SOURCEFILE
+       cat "$abs_srcdir/$testfile" >> $SOURCEFILE
 
-               PACKAGEFLAGS=$([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg")
-               echo "G_DEBUG=fatal-warnings $VALAC $VALAFLAGS $PACKAGEFLAGS -o $ns$EXEEXT $SOURCEFILE" >> 
prepare
-               echo "G_DEBUG=fatal-warnings ./$ns$EXEEXT" >> check
-               ;;
-       *.gs)
-               testpath=${testfile/.gs/}
-               ns=${testpath//\//_}
-               ns=${ns//-/_}
-               SOURCEFILE=$ns.gs
+       PACKAGEFLAGS=$([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg")
+       echo "G_DEBUG=fatal-warnings $VALAC $VALAFLAGS $PACKAGEFLAGS -o $ns$EXEEXT $SOURCEFILE" >> prepare
+       echo "G_DEBUG=fatal-warnings ./$ns$EXEEXT" >> check
+       ;;
+*.gs)
+       testpath=${testfile/.gs/}
+       ns=${testpath//\//_}
+       ns=${ns//-/_}
+       SOURCEFILE=$ns.gs
 
-               cat "$srcdir/$testfile" >> $SOURCEFILE
+       cat "$abs_srcdir/$testfile" >> $SOURCEFILE
 
-               PACKAGEFLAGS=$([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg")
-               echo "G_DEBUG=fatal-warnings $VALAC $VALAFLAGS $PACKAGEFLAGS -o $ns$EXEEXT $SOURCEFILE" >> 
prepare
-               echo "G_DEBUG=fatal-warnings ./$ns$EXEEXT" >> check
-               ;;
-       *.test)
-               PART=0
-               INHEADER=1
-               INVALIDCODE=0
-               GIRTEST=0
-               DBUSTEST=0
-               ISSERVER=0
-               testpath=
-               while IFS="" read -r line; do
-                       if [ $PART -eq 0 ]; then
-                               if [ -n "$line" ]; then
-                                       testheader $line
-                               else
-                                       PART=1
-                               fi
-                       else
-                               if [ $INHEADER -eq 1 ]; then
-                                       if [ -n "$line" ]; then
-                                               sourceheader $line
-                                       else
-                                               INHEADER=0
-                                       fi
-                               else
-                                       if echo "$line" | grep -q "^[A-Za-z]\+:"; then
-                                               sourceend
-                                               PART=$(($PART + 1))
-                                               INHEADER=1
-                                               testpath=
-                                               sourceheader $line
-                                       else
-                                               echo "$line" >> $SOURCEFILE
-                                       fi
-                               fi
-                       fi
-               done < "$srcdir/$testfile"
-               sourceend
-               ;;
-       esac
+       PACKAGEFLAGS=$([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg")
+       echo "G_DEBUG=fatal-warnings $VALAC $VALAFLAGS $PACKAGEFLAGS -o $ns$EXEEXT $SOURCEFILE" >> prepare
+       echo "G_DEBUG=fatal-warnings ./$ns$EXEEXT" >> check
+       ;;
+*.test)
+       PART=0
+       INHEADER=1
+       INVALIDCODE=0
+       GIRTEST=0
+       DBUSTEST=0
+       ISSERVER=0
+       testpath=
+       while IFS="" read -r line; do
+                   if [ $PART -eq 0 ]; then
+                           if [ -n "$line" ]; then
+                                   testheader $line
+                           else
+                                   PART=1
+                           fi
+                   else
+                           if [ $INHEADER -eq 1 ]; then
+                                   if [ -n "$line" ]; then
+                                           sourceheader $line
+                                   else
+                                           INHEADER=0
+                                   fi
+                           else
+                                   if echo "$line" | grep -q "^[A-Za-z]\+:"; then
+                                           sourceend
+                                           PART=$(($PART + 1))
+                                           INHEADER=1
+                                           testpath=
+                                           sourceheader $line
+                                   else
+                                           echo "$line" >> $SOURCEFILE
+                                   fi
+                           fi
+                   fi
+       done < "$abs_srcdir/$testfile"
+       sourceend
+       ;;
+esac
 
-       cat prepare check > $ns.check
-       cat << EOF >> checkall
-echo -n -e "  /$testpath: \033[72G"
+cat prepare check > $ns.check
+cat << EOF >> checkall
+echo -n -e "  $testpath: "
 ((all++))
 if $run_prefix bash $ns.check &>log; then
-       echo -e "\033[0;32mOK\033[m"
+       echo -e "OK"
 else
        ((fail++))
-       echo -e "\033[0;31mFAIL\033[m"
+       echo -e "FAIL"
        cat log
 fi
 EOF
-done
 
 cat << "EOF" >> checkall
 if [ $fail -eq 0 ]; then
@@ -247,13 +250,12 @@ else
 fi
 EOF
 
-echo -e "\033[0;33mDONE\033[m"
+echo -e "DONE"
 
 if bash checkall; then
-       cd $builddir
+       cd $abs_builddir
        rm -rf $testdir
 else
-       cd $builddir
+       cd $abs_builddir
        exit 1
 fi
-
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 000000000..7e563b8b3
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,2 @@
+*.log
+*.trs
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 57020feee..47e9a711b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,7 +18,24 @@ BUILT_SOURCES = \
 noinst_PROGRAMS = \
        $(NULL)
 
-TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' 
TEST_CFLAGS='$(TEST_CFLAGS)' CC='$(CC)' $(srcdir)/testrunner.sh
+TEST_EXTENSIONS = .vala .gs .test
+
+TEST_RUNNER = $(abs_top_srcdir)/build-aux/testrunner.sh
+VALA_LOG_COMPILER = $(TEST_RUNNER)
+GS_LOG_COMPILER = $(TEST_RUNNER)
+TEST_LOG_COMPILER = $(TEST_RUNNER)
+
+AM_TESTS_ENVIRONMENT = \
+       export EXEEXT=$(EXEEXT); \
+       export CFLAGS='$(CFLAGS)'; \
+       export CPPFLAGS='$(CPPFLAGS)'; \
+       export LDFLAGS='$(LDFLAGS)'; \
+       export TEST_CFLAGS='$(TEST_CFLAGS)'; \
+       export abs_top_srcdir='$(abs_top_srcdir)'; \
+       export abs_top_builddir='$(abs_top_builddir)'; \
+       export abs_srcdir='$(abs_srcdir)'; \
+       export abs_builddir='$(abs_builddir)'; \
+       export CC='$(CC)';
 
 TESTS = \
        basic-types/integers.vala \
@@ -1019,9 +1036,6 @@ TESTS = \
        semantic/yield-creation-requires-async-context.test \
        semantic/yield-creation-requires-async-method.test \
        semantic/yield-statement-requires-async-context.test \
-       $(NULL)
-
-NON_NULL_TESTS = \
        nullability/bug611223.vala \
        nullability/local-variable-invalid-convert.test \
        nullability/member-access-nullable-instance.test \
@@ -1029,30 +1043,11 @@ NON_NULL_TESTS = \
        nullability/method-return-invalid-convert.test \
        nullability/string-concat.test \
        nullability/with-non-null.test \
-       $(NULL)
-
-LINUX_TESTS = \
-       linux/bug793444.vala \
-       posix/file-commandpipe.vala \
-       $(NULL)
-
-POSIX_TESTS = \
-       basic-types/arrays.vala \
-       arrays/empty-length-0.vala \
-       structs/struct_only.vala \
-       delegates/delegate_only.vala \
-       enums/enum_only.vala \
-       $(NULL)
-
-VERSION_CHECK_TESTS = \
        version/since-constant.test \
        version/since-field.test \
        version/since-local-variable.test \
        version/since-method.test \
        version/since-parameter.test \
-       $(NULL)
-
-GENIE_TESTS = \
        genie/class.gs \
        genie/control-flow-if-do.gs \
        genie/control-flow-if-else.gs \
@@ -1117,32 +1112,29 @@ GENIE_TESTS = \
        genie/preparser-or-expression.gs \
        genie/struct.gs \
        genie/struct-after-class.gs \
+       $(LINUX_TESTS) \
        $(NULL)
 
-check-TESTS: $(TESTS) $(NON_NULL_TESTS)
-       @EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' 
TEST_CFLAGS='$(TEST_CFLAGS)' CC='$(CC)' \
-               $(srcdir)/testrunner.sh $(TESTS)
+LINUX_TESTS = $(NULL)
+
 if HAVE_LINUX
-       @EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' 
TEST_CFLAGS='$(TEST_CFLAGS)' CC='$(CC)' \
-               PACKAGES="linux" $(srcdir)/testrunner.sh $(LINUX_TESTS)
-       @EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' 
TEST_CFLAGS='$(TEST_CFLAGS)' CC='$(CC)' \
-               VALAFLAGS="--profile posix" PACKAGES="posix linux" $(srcdir)/testrunner.sh $(POSIX_TESTS)
+LINUX_TESTS += \
+       linux/bug793444.vala \
+       linux/file-commandpipe.vala \
+       posix/arrays.vala \
+       posix/empty-length-0.vala \
+       posix/struct_only.vala \
+       posix/delegate_only.vala \
+       posix/enum_only.vala \
+       $(NULL)
 endif
-       @EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' 
TEST_CFLAGS='$(TEST_CFLAGS)' CC='$(CC)' \
-               VALAFLAGS="--enable-experimental-non-null" $(srcdir)/testrunner.sh $(NON_NULL_TESTS)
-       @export PKG_CONFIG_PATH=$(abs_srcdir)/version; EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' 
CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' \
-               TEST_CFLAGS='$(TEST_CFLAGS)' CC='$(CC)' $(srcdir)/testrunner.sh $(VERSION_CHECK_TESTS)
-       @EXEEXT=$(EXEEXT) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' 
TEST_CFLAGS='$(TEST_CFLAGS)' CC='$(CC)' \
-               $(srcdir)/testrunner.sh $(GENIE_TESTS)
 
 EXTRA_DIST = \
-       testrunner.sh \
+       linux/tests-extra-environment.sh \
+       nullability/tests-extra-environment.sh \
+       posix/tests-extra-environment.sh \
        version/glib-2.0.pc \
+       version/tests-extra-environment.sh \
        $(TESTS) \
-       $(NON_NULL_TESTS) \
        $(LINUX_TESTS) \
-       $(POSIX_TESTS) \
-       $(VERSION_CHECK_TESTS) \
-       $(GENIE_TESTS) \
        $(NULL)
-
diff --git a/tests/posix/file-commandpipe.vala b/tests/linux/file-commandpipe.vala
similarity index 100%
rename from tests/posix/file-commandpipe.vala
rename to tests/linux/file-commandpipe.vala
diff --git a/tests/linux/tests-extra-environment.sh b/tests/linux/tests-extra-environment.sh
new file mode 100644
index 000000000..b6b38e3ba
--- /dev/null
+++ b/tests/linux/tests-extra-environment.sh
@@ -0,0 +1 @@
+PACKAGES="linux"
diff --git a/tests/nullability/tests-extra-environment.sh b/tests/nullability/tests-extra-environment.sh
new file mode 100644
index 000000000..0f2be824f
--- /dev/null
+++ b/tests/nullability/tests-extra-environment.sh
@@ -0,0 +1 @@
+VALAFLAGS="--enable-experimental-non-null"
diff --git a/tests/posix/arrays.vala b/tests/posix/arrays.vala
new file mode 120000
index 000000000..c5acf0047
--- /dev/null
+++ b/tests/posix/arrays.vala
@@ -0,0 +1 @@
+../basic-types/arrays.vala
\ No newline at end of file
diff --git a/tests/posix/delegate_only.vala b/tests/posix/delegate_only.vala
new file mode 120000
index 000000000..a6397a094
--- /dev/null
+++ b/tests/posix/delegate_only.vala
@@ -0,0 +1 @@
+../delegates/delegate_only.vala
\ No newline at end of file
diff --git a/tests/posix/empty-length-0.vala b/tests/posix/empty-length-0.vala
new file mode 120000
index 000000000..7ded9d744
--- /dev/null
+++ b/tests/posix/empty-length-0.vala
@@ -0,0 +1 @@
+../arrays/empty-length-0.vala
\ No newline at end of file
diff --git a/tests/posix/enum_only.vala b/tests/posix/enum_only.vala
new file mode 120000
index 000000000..4d86cb050
--- /dev/null
+++ b/tests/posix/enum_only.vala
@@ -0,0 +1 @@
+../enums/enum_only.vala
\ No newline at end of file
diff --git a/tests/posix/struct_only.vala b/tests/posix/struct_only.vala
new file mode 120000
index 000000000..fb269184e
--- /dev/null
+++ b/tests/posix/struct_only.vala
@@ -0,0 +1 @@
+../structs/struct_only.vala
\ No newline at end of file
diff --git a/tests/posix/tests-extra-environment.sh b/tests/posix/tests-extra-environment.sh
new file mode 100644
index 000000000..ef342f591
--- /dev/null
+++ b/tests/posix/tests-extra-environment.sh
@@ -0,0 +1,2 @@
+VALAFLAGS="--profile posix"
+PACKAGES="posix linux"
diff --git a/tests/version/tests-extra-environment.sh b/tests/version/tests-extra-environment.sh
new file mode 100644
index 000000000..26cb79797
--- /dev/null
+++ b/tests/version/tests-extra-environment.sh
@@ -0,0 +1 @@
+PKG_CONFIG_PATH=$abs_srcdir/version
diff --git a/valadoc/tests/.gitignore b/valadoc/tests/.gitignore
new file mode 100644
index 000000000..7e563b8b3
--- /dev/null
+++ b/valadoc/tests/.gitignore
@@ -0,0 +1,2 @@
+*.log
+*.trs
diff --git a/valadoc/tests/Makefile.am b/valadoc/tests/Makefile.am
index 13670e268..62edb7b7c 100644
--- a/valadoc/tests/Makefile.am
+++ b/valadoc/tests/Makefile.am
@@ -2,23 +2,32 @@ include $(top_srcdir)/Makefile.common
 
 NULL =
 
-TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) PACKAGE_SUFFIX=$(PACKAGE_SUFFIX) TOPBUILDDIR=$(abs_top_builddir) 
TOPSRCDIR=$(abs_top_srcdir) \
-       CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' TEST_CFLAGS='$(TEST_CFLAGS)' 
CC='$(CC)' $(srcdir)/testrunner.sh
+LOG_COMPILER = $(abs_top_srcdir)/build-aux/testrunner.sh
+AM_TESTS_ENVIRONMENT = \
+       export EXEEXT=$(EXEEXT); \
+       export CFLAGS='$(CFLAGS)'; \
+       export CPPFLAGS='$(CPPFLAGS)'; \
+       export LDFLAGS='$(LDFLAGS)'; \
+       export TEST_CFLAGS='$(TEST_CFLAGS)'; \
+       export PACKAGE_SUFFIX='$(PACKAGE_SUFFIX)' \
+       export abs_top_srcdir='$(abs_top_srcdir)'; \
+       export abs_top_builddir='$(abs_top_builddir)'; \
+       export abs_srcdir='$(abs_srcdir)'; \
+       export abs_builddir='$(abs_builddir)'; \
+       export CC='$(CC)';
 
 TESTS = \
        libvaladoc/errorreporter.vala \
        libvaladoc/markupreader.vala \
        libvaladoc/gtkdoc-scanner.vala \
-       libvaladoc/parser/manyrule.vala \
-       libvaladoc/parser/oneofrule.vala \
-       libvaladoc/parser/sequencerule.vala \
-       libvaladoc/parser/optionalrule.vala \
-       libvaladoc/parser/stubrule.vala \
+       libvaladoc/parser-manyrule.vala \
+       libvaladoc/parser-oneofrule.vala \
+       libvaladoc/parser-sequencerule.vala \
+       libvaladoc/parser-optionalrule.vala \
+       libvaladoc/parser-stubrule.vala \
        $(NULL)
 
-check-TESTS: $(TESTS)
-       @EXEEXT=$(EXEEXT) PACKAGE_SUFFIX=$(PACKAGE_SUFFIX) TOPBUILDDIR=$(abs_top_builddir) 
TOPSRCDIR=$(abs_top_srcdir) \
-               CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' TEST_CFLAGS='$(TEST_CFLAGS)' 
CC='$(CC)' $(srcdir)/testrunner.sh $(TESTS)
+check-local:
        G_DEBUG=fatal_warnings $(builddir)/driver
 
 AM_CFLAGS = \
@@ -90,11 +99,11 @@ driver.vala.stamp: $(driver_VALASOURCES) $(top_srcdir)/vala/libvala@PACKAGE_SUFF
 EXTRA_DIST = \
        driver.vala.stamp \
        $(driver_SOURCES) \
-       testrunner.sh \
        drivers/api-test.data.vapi \
        drivers/driver-test.vala \
        drivers/generic-api-test.vala \
-       libvaladoc/parser/generic-scanner.vala \
+       libvaladoc/parser-generic-scanner.vala \
+       libvaladoc/tests-extra-environment.sh \
        $(TESTS) \
        $(NULL)
 
diff --git a/valadoc/tests/libvaladoc/parser/generic-scanner.vala 
b/valadoc/tests/libvaladoc/parser-generic-scanner.vala
similarity index 100%
rename from valadoc/tests/libvaladoc/parser/generic-scanner.vala
rename to valadoc/tests/libvaladoc/parser-generic-scanner.vala
diff --git a/valadoc/tests/libvaladoc/parser/manyrule.vala b/valadoc/tests/libvaladoc/parser-manyrule.vala
similarity index 100%
rename from valadoc/tests/libvaladoc/parser/manyrule.vala
rename to valadoc/tests/libvaladoc/parser-manyrule.vala
diff --git a/valadoc/tests/libvaladoc/parser/oneofrule.vala b/valadoc/tests/libvaladoc/parser-oneofrule.vala
similarity index 100%
rename from valadoc/tests/libvaladoc/parser/oneofrule.vala
rename to valadoc/tests/libvaladoc/parser-oneofrule.vala
diff --git a/valadoc/tests/libvaladoc/parser/optionalrule.vala 
b/valadoc/tests/libvaladoc/parser-optionalrule.vala
similarity index 100%
rename from valadoc/tests/libvaladoc/parser/optionalrule.vala
rename to valadoc/tests/libvaladoc/parser-optionalrule.vala
diff --git a/valadoc/tests/libvaladoc/parser/sequencerule.vala 
b/valadoc/tests/libvaladoc/parser-sequencerule.vala
similarity index 100%
rename from valadoc/tests/libvaladoc/parser/sequencerule.vala
rename to valadoc/tests/libvaladoc/parser-sequencerule.vala
diff --git a/valadoc/tests/libvaladoc/parser/stubrule.vala b/valadoc/tests/libvaladoc/parser-stubrule.vala
similarity index 100%
rename from valadoc/tests/libvaladoc/parser/stubrule.vala
rename to valadoc/tests/libvaladoc/parser-stubrule.vala
diff --git a/valadoc/tests/libvaladoc/tests-extra-environment.sh 
b/valadoc/tests/libvaladoc/tests-extra-environment.sh
new file mode 100644
index 000000000..bed7659ed
--- /dev/null
+++ b/valadoc/tests/libvaladoc/tests-extra-environment.sh
@@ -0,0 +1,17 @@
+VALAFLAGS="\
+       -X -D -X TOP_SRC_DIR=\"$abs_top_srcdir\" \
+       --pkg libgvc \
+       --vapidir $abs_top_srcdir/vala \
+       --pkg libvala$PACKAGE_SUFFIX \
+       --vapidir $abs_top_srcdir/libvaladoc \
+       --pkg valadoc$PACKAGE_SUFFIX \
+       --main main \
+       -X -L$abs_top_builddir/vala/.libs -X -lvala$PACKAGE_SUFFIX \
+       -X -L$abs_top_builddir/libvaladoc/.libs -X -lvaladoc$PACKAGE_SUFFIX \
+       -X -I$abs_top_srcdir/gee \
+       -X -I$abs_top_srcdir/vala \
+       -X -I$abs_top_srcdir/libvaladoc \
+       $abs_top_srcdir/valadoc/tests/libvaladoc/parser-generic-scanner.vala \
+"
+PKG_CONFIG_PATH=$abs_top_builddir:$abs_top_builddir/libvaladoc
+LD_LIBRARY_PATH=$abs_top_builddir/vala/.libs:$abs_top_builddir/libvaladoc/.libs


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]