mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-10 23:22:33 +02:00
Moved function that runs command for all unit tests to unit_test.sh.
Testclean target should work now.
This commit is contained in:
+3
-31
@@ -7,41 +7,13 @@ SUBDIRS = src doc
|
||||
|
||||
DOLLAR = $
|
||||
|
||||
build_tests.commands = for directory in `find . -name unit_tests`; \
|
||||
do \
|
||||
home=`pwd`; \
|
||||
echo; \
|
||||
echo "Building test in "$${DOLLAR}$${DOLLAR}directory; \
|
||||
cd $${DOLLAR}$${DOLLAR}directory; \
|
||||
qmake -spec $${DOLLAR}$${DOLLAR}QMAKESPEC; \
|
||||
make; \
|
||||
cd $${DOLLAR}$${DOLLAR}home; \
|
||||
done
|
||||
build_tests.commands = ./unit_tests.sh make
|
||||
build_tests.depends = all
|
||||
|
||||
run_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 -spec $${DOLLAR}$${DOLLAR}QMAKESPEC; \
|
||||
make run; \
|
||||
cd $${DOLLAR}$${DOLLAR}home; \
|
||||
done
|
||||
run_tests.commands = ./unit_tests.sh make run
|
||||
run_tests.depends = all
|
||||
|
||||
testclean.commands = for directory in `find . -name unit_tests`; \
|
||||
do \
|
||||
home=`pwd`; \
|
||||
echo; \
|
||||
echo "Cleaning test files in "$${DOLLAR}$${DOLLAR}directory; \
|
||||
cd $${DOLLAR}$${DOLLAR}directory; \
|
||||
qmake -spec $${DOLLAR}$${DOLLAR}QMAKESPEC; \
|
||||
make clean; \
|
||||
cd $${DOLLAR}$${DOLLAR}home; \
|
||||
done
|
||||
|
||||
testclean.commands = ./unit_tests.sh make clean
|
||||
tests.depends = run_tests
|
||||
|
||||
QMAKE_EXTRA_TARGETS += build_tests run_tests tests testclean
|
||||
|
||||
@@ -13,5 +13,13 @@ run.commands = echo "Running tests..." && \
|
||||
cd $${DOLLAR}$${DOLLAR}home; \
|
||||
done; \
|
||||
kill $${DOLLAR}$${DOLLAR}pid;
|
||||
|
||||
clean.commands = for directory in `find . -maxdepth 1 -type d -regex \'\./[A-Za-z0-9\-\_]*\'`; \
|
||||
do \
|
||||
cd $${DOLLAR}$${DOLLAR}directory; \
|
||||
[ ! -e Makefile ] && qmake -spec $${DOLLAR}$${DOLLAR}QMAKESPEC; \
|
||||
make clean; \
|
||||
cd -; \
|
||||
done
|
||||
|
||||
QMAKE_EXTRA_TARGETS += run
|
||||
QMAKE_EXTRA_TARGETS += run clean
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
action=$@
|
||||
|
||||
for directory in $(find . -name unit_tests)
|
||||
do
|
||||
home=`pwd`
|
||||
cd $directory
|
||||
qmake -spec $QMAKESPEC
|
||||
$action
|
||||
cd $home
|
||||
done
|
||||
Reference in New Issue
Block a user