File tree Expand file tree Collapse file tree 2 files changed +15
-20
lines changed
python/paddle/trainer_config_helpers/tests Expand file tree Collapse file tree 2 files changed +15
-20
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,10 @@ add_test(NAME test_reset_hook
9
9
${PYTHON_EXECUTABLE} ${PROJ_ROOT} /python/paddle/trainer_config_helpers/tests/test_reset_hook.py
10
10
WORKING_DIRECTORY ${PROJ_ROOT} /python/paddle )
11
11
12
- if (PROTOBUF_3 )
13
- add_paddle_exe (protobuf_equal
14
- ProtobufEqualMain.cpp )
15
- add_test (NAME test_layerHelpers
16
- COMMAND
17
- ${PROJ_ROOT} /python/paddle/trainer_config_helpers/tests/configs/run_tests.sh ${PYTHON_EXECUTABLE}
18
- ${CMAKE_CURRENT_BINARY_DIR} /protobuf_equal
19
- )
20
- else ()
21
- add_test (NAME test_layerHelpers
22
- COMMAND
23
- ${PROJ_ROOT} /python/paddle/trainer_config_helpers/tests/configs/run_tests.sh ${PYTHON_EXECUTABLE}
24
- )
25
- endif ()
12
+ add_paddle_exe (protobuf_equal
13
+ ProtobufEqualMain.cpp )
14
+ add_test (NAME test_layerHelpers
15
+ COMMAND
16
+ ${PROJ_ROOT} /python/paddle/trainer_config_helpers/tests/configs/run_tests.sh ${PYTHON_EXECUTABLE}
17
+ ${CMAKE_CURRENT_BINARY_DIR} /protobuf_equal
18
+ )
Original file line number Diff line number Diff line change 2
2
cd ` dirname $0 `
3
3
4
4
set -e
5
+ PYTHON_EXEC=$1
6
+ COMPARE_PROTO_UTIL=$2
5
7
6
8
protostr=` dirname $0 ` /protostr
7
9
8
10
files=` ls $protostr | grep -v " unittest" `
9
11
10
- ./generate_protostr.sh $1
12
+ ./generate_protostr.sh ${PYTHON_EXEC}
11
13
12
14
. ./file_list.sh
13
15
14
- if [ -z $1 ]; then
16
+ if [ -z ${COMPARE_PROTO_UTIL} ]; then
15
17
for file in $files
16
18
do
17
19
base_protostr=$protostr /$file
@@ -22,20 +24,20 @@ if [ -z $1 ]; then
22
24
else
23
25
for file in ${configs[*]}
24
26
do
25
- if ! $1 $protostr /$file .protostr $protostr /$file .protostr.unittest; then
27
+ if ! ${COMPARE_PROTO_UTIL} $protostr /$file .protostr $protostr /$file .protostr.unittest; then
26
28
diff $protostr /$file .protostr $protostr /$file .protostr.unittest -u
27
29
fi
28
- if ! $1 $protostr /$file .protostr $protostr /$file .protostr.non_file_config.unittest; then
30
+ if ! ${COMPARE_PROTO_UTIL} $protostr /$file .protostr $protostr /$file .protostr.non_file_config.unittest; then
29
31
diff $protostr /$file .protostr $protostr /$file .protostr.non_file_config.unittest -u
30
32
fi
31
33
done
32
34
33
35
for file in ${whole_configs[*]}
34
36
do
35
- if ! $1 $protostr /$file .protostr $protostr /$file .protostr.unittest --whole; then
37
+ if ! ${COMPARE_PROTO_UTIL} $protostr /$file .protostr $protostr /$file .protostr.unittest --whole; then
36
38
diff $protostr /$file .protostr $protostr /$file .protostr.unittest -u
37
39
fi
38
- if ! $1 $protostr /$file .protostr $protostr /$file .protostr.non_file_config.unittest --whole; then
40
+ if ! ${COMPARE_PROTO_UTIL} $protostr /$file .protostr $protostr /$file .protostr.non_file_config.unittest --whole; then
39
41
diff $protostr /$file .protostr $protostr /$file .protostr.non_file_config.unittest -u
40
42
fi
41
43
done
You can’t perform that action at this time.
0 commit comments