diff --git a/fwbuilder3.pro b/fwbuilder3.pro index 130acb5e8..079944746 100644 --- a/fwbuilder3.pro +++ b/fwbuilder3.pro @@ -5,7 +5,17 @@ TEMPLATE = subdirs SUBDIRS = src doc -tests.commands = cd src && cd compiler_lib && cd unit_tests && qmake && make run; \ - cd .. && cd .. && cd gui && unit_tests && qmake && make run +DOLLAR = $ + +tests.commands = for directory in `find . -name unit_tests`; \ + do \ + home=`pwd`; \ + echo; \ + echo "Running test in "$${DOLLAR}$${DOLLAR}directory; \ + cd $${DOLLAR}$${DOLLAR}directory; \ + qmake; \ + make run; \ + cd $${DOLLAR}$${DOLLAR}home; \ + done QMAKE_EXTRA_TARGETS += tests diff --git a/src/gui/unit_tests/unit_tests.pro b/src/gui/unit_tests/unit_tests.pro index 8e6a8092b..ede0764e8 100644 --- a/src/gui/unit_tests/unit_tests.pro +++ b/src/gui/unit_tests/unit_tests.pro @@ -1,7 +1,13 @@ +DOLLAR = $ + run.commands = echo "Running tests..." && \ - cd FWBTree && qmake && make run; cd ..; \ - cd ImporterTest && qmake && make run; cd ..; \ - cd RCS && qmake && make run; cd ..; \ - cd UsageResolverTest && qmake && make run; cd ..; + for directory in `find . -type d -maxdepth 1 -regex \'\./[A-Za-z0-9\-\_]*\'`; \ + do \ + home=`pwd`; \ + cd $${DOLLAR}$${DOLLAR}directory; \ + qmake; \ + make run; \ + cd $${DOLLAR}$${DOLLAR}home; \ + done QMAKE_EXTRA_TARGETS += run diff --git a/src/unit_tests/unit_tests.pro b/src/unit_tests/unit_tests.pro new file mode 100644 index 000000000..7ab3f39a5 --- /dev/null +++ b/src/unit_tests/unit_tests.pro @@ -0,0 +1,5 @@ +DOLLAR = $ + +run.commands = ./run-tests.sh + +QMAKE_EXTRA_TARGETS += run