Skip to content

Commit 2a32389

Browse files
committed
common def files for unit tests build.
1 parent 89c0fd0 commit 2a32389

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#(used by the makefile which import)
2+
APP_SOURCECODE_ROOT = ./../../application
3+
4+
#to adjust:
5+
#asus:
6+
THIRD_PARTY_LIBS_ROOT = /home/laurent/work/thirdpartylibs
7+
8+
#vm:
9+
#THIRD_PARTY_LIBS_ROOT = /home/laurent/thirdpartylibs/src
10+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
build_test_dir=/home/laurent/work/dev_techtest_sandbox/about_Qt/build-test
4+
5+
cd $build_test_dir
6+
7+
pattern_array=(
8+
"*.o"
9+
"moc_*.cpp"
10+
"moc_*.h"
11+
"Makefile"
12+
"test_Qt*"
13+
)
14+
15+
pattern_array_rejectWithExtension=(
16+
false
17+
false
18+
false
19+
true
20+
true
21+
)
22+
23+
for idx in ${!pattern_array[@]}; do
24+
echo "find "${pattern_array[$idx]}
25+
if ${pattern_array_rejectWithExtension[$idx]}
26+
then
27+
echo "(file with extension rejected)"
28+
find . -name ${pattern_array[$idx]} ! -name "*.*" -type f
29+
else
30+
echo "(file with extension permitted)"
31+
find . -name ${pattern_array[$idx]} -type f
32+
fi
33+
done
34+
35+
36+
echo "Do you confirm to remove this files list ?"
37+
read -p "Confirm ?" -n 1 -r
38+
echo # (optional) move to a new line
39+
if [[ ! $REPLY =~ ^[Yy]$ ]]
40+
then
41+
echo "remove canceled"
42+
exit 1
43+
fi
44+
45+
46+
for idx in ${!pattern_array[@]}; do
47+
echo "find and remove "${pattern_array[$idx]}
48+
if ${pattern_array_rejectWithExtension[$idx]}
49+
then
50+
echo "(file with extension rejected)"
51+
find . -name ${pattern_array[$idx]} ! -name "*.*" -type f -delete
52+
else
53+
echo "(file with extension permitted)"
54+
find . -name ${pattern_array[$idx]} -type f -delete
55+
fi
56+
done
57+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# for the different tests involving Qt, INPRO__THIRD_PARTY_LIBS_ROOT is set by default from ../application/thirdpartylibs.pri
3+
# but you can set to a different value if you need for tests purpose, defining INPRO__THIRD_PARTY_LIBS_ROOT here instead
4+
5+
#default setting from ../application/thirdpartylibs.pri:
6+
7+
#include( ../application/thirdpartylibs.pri )
8+
!include( ../application/thirdpartylibs.pri ) {
9+
error( "No ../application/thirdpartylibs.pri file found" )
10+
}
11+

0 commit comments

Comments
 (0)