File tree Expand file tree Collapse file tree 7 files changed +668
-647
lines changed Expand file tree Collapse file tree 7 files changed +668
-647
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ goto SUCCESS
27
27
:DIFFFOUND
28
28
@ echo " " >& 2
29
29
@ echo " ERROR: ********************************************************" >& 2
30
- @ echo " ERROR: The following differences were found after running the " >& 2
31
- @ echo " ERROR: tests/generate_code.sh script. Maybe you forgot to run " >& 2
32
- @ echo " ERROR: it after making changes in a generator or schema ?" >& 2
30
+ @ echo " ERROR: The following differences were found after building. " >& 2
31
+ @ echo " ERROR: Perhaps there is a difference in the flags for the " >& 2
32
+ @ echo " ERROR: CMakeLists.txt vs the tests/generate_code.bat script ?" >& 2
33
33
@ echo " ERROR: ********************************************************" >& 2
34
34
@ echo " " >& 2
35
35
@ git -c core.autocrlf=true --no-pager diff --binary
Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
set -e
17
17
18
+ if ! git diff --quiet; then
19
+ echo >&2
20
+ echo " ERROR: ********************************************************" >&2
21
+ echo " ERROR: The following differences were found after building." >&2
22
+ echo " ERROR: Perhaps there is a difference in the flags for the" >&2
23
+ echo " ERROR: CMakeLists.txt vs the tests/generate_code.sh script?" >&2
24
+ echo " ERROR: ********************************************************" >&2
25
+ echo >&2
26
+ git diff --binary --exit-code
27
+ fi
28
+
18
29
cd tests
19
30
./generate_code.sh
20
31
cd ..
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ set TEST_NOINCL_FLAGS=%TEST_BASE_FLAGS% --no-includes
54
54
..\%buildtype% \flatc.exe --rust %TEST_RUST_FLAGS% -I include_test -o include_test1 include_test/include_test1.fbs || goto FAIL
55
55
..\%buildtype% \flatc.exe --rust %TEST_RUST_FLAGS% -I include_test -o include_test2 include_test/sub/include_test2.fbs || goto FAIL
56
56
..\%buildtype% \flatc.exe -b --schema --bfbs-comments --bfbs-filenames . --bfbs-builtins -I include_test monster_test.fbs || goto FAIL
57
- ..\%buildtype% \flatc.exe --cpp --bfbs-comments --bfbs-builtins --bfbs-gen-embed %TEST_NOINCL_FLAGS% %TEST_CPP_FLAGS% -I include_test monster_test.fbs || goto FAIL
58
- ..\%buildtype% \flatc.exe -b --schema --bfbs-comments --bfbs-builtins -I include_test arrays_test.fbs || goto FAIL
57
+ ..\%buildtype% \flatc.exe --cpp --bfbs-comments --bfbs-filenames . --bfbs- builtins --bfbs-gen-embed %TEST_NOINCL_FLAGS% %TEST_CPP_FLAGS% -I include_test monster_test.fbs || goto FAIL
58
+ ..\%buildtype% \flatc.exe -b --schema --bfbs-comments --bfbs-filenames . --bfbs- builtins -I include_test arrays_test.fbs || goto FAIL
59
59
..\%buildtype% \flatc.exe --jsonschema --schema -I include_test monster_test.fbs || goto FAIL
60
60
..\%buildtype% \flatc.exe --cpp --java --csharp --jsonschema %TEST_NOINCL_FLAGS% %TEST_CPP_FLAGS% %TEST_CS_FLAGS% --scoped-enums arrays_test.fbs || goto FAIL
61
61
..\%buildtype% \flatc.exe --rust %TEST_RUST_FLAGS% -o arrays_test arrays_test.fbs || goto FAIL
@@ -98,7 +98,7 @@ if NOT "%MONSTER_EXTRA%"=="skip" (
98
98
99
99
cd ../samples
100
100
..\%buildtype% \flatc.exe --cpp --lobster %TEST_BASE_FLAGS% %TEST_CPP_FLAGS% monster.fbs || goto FAIL
101
- ..\%buildtype% \flatc.exe -b --schema --bfbs-comments --bfbs-builtins monster.fbs || goto FAIL
101
+ ..\%buildtype% \flatc.exe -b --schema --bfbs-comments --bfbs-filenames . --bfbs- builtins monster.fbs || goto FAIL
102
102
cd ../reflection
103
103
call generate_code.bat %1 %2 || goto FAIL
104
104
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_TS_FLAGS -o namespace_te
52
52
../flatc --rust $TEST_RUST_FLAGS -o include_test1 -I include_test include_test/include_test1.fbs
53
53
../flatc --rust $TEST_RUST_FLAGS -o include_test2 -I include_test include_test/sub/include_test2.fbs
54
54
../flatc -b --schema --bfbs-comments --bfbs-filenames . --bfbs-builtins -I include_test monster_test.fbs
55
- ../flatc --cpp --bfbs-comments --bfbs-builtins --bfbs-gen-embed $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS -I include_test monster_test.fbs
56
- ../flatc -b --schema --bfbs-comments --bfbs-builtins -I include_test arrays_test.fbs
55
+ ../flatc --cpp --bfbs-comments --bfbs-filenames . --bfbs- builtins --bfbs-gen-embed $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS -I include_test monster_test.fbs
56
+ ../flatc -b --schema --bfbs-comments --bfbs-filenames . --bfbs- builtins -I include_test arrays_test.fbs
57
57
../flatc --jsonschema --schema -I include_test monster_test.fbs
58
58
../flatc --cpp --java --kotlin --csharp --python $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS monster_extra.fbs monsterdata_extra.json
59
59
../flatc --cpp --java --csharp --jsonschema $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS --scoped-enums arrays_test.fbs
@@ -109,6 +109,6 @@ TEST_CPP17_FLAGS="--cpp --cpp-std c++17 --cpp-static-reflection --gen-object-api
109
109
cd ../samples
110
110
../flatc --cpp --lobster $TEST_BASE_FLAGS $TEST_CPP_FLAGS monster.fbs
111
111
../flatc --rust $TEST_RUST_FLAGS -o rust_generated monster.fbs
112
- ../flatc -b --schema --bfbs-comments --bfbs-builtins monster.fbs
112
+ ../flatc -b --schema --bfbs-filenames . --bfbs- comments --bfbs-builtins monster.fbs
113
113
cd ../reflection
114
114
./generate_code.sh --cpp-std c++0x
You can’t perform that action at this time.
0 commit comments