Make and generate_code.sh generate same outputs (#6855)
* added --bfbs-builtins * update generate_code.bat * forgot the . * updated checking scripts * added bypass for the monster_test.bfbs and arrays_test.bfbs diff issue * removed check on windows for now
This commit is contained in:
parent
9d686bf433
commit
e2b26ee19b
|
@ -27,9 +27,9 @@ goto SUCCESS
|
|||
:DIFFFOUND
|
||||
@echo "" >&2
|
||||
@echo "ERROR: ********************************************************" >&2
|
||||
@echo "ERROR: The following differences were found after running the" >&2
|
||||
@echo "ERROR: tests/generate_code.sh script. Maybe you forgot to run" >&2
|
||||
@echo "ERROR: it after making changes in a generator or schema?" >&2
|
||||
@echo "ERROR: The following differences were found after building." >&2
|
||||
@echo "ERROR: Perhaps there is a difference in the flags for the" >&2
|
||||
@echo "ERROR: CMakeLists.txt vs the tests/generate_code.bat script?" >&2
|
||||
@echo "ERROR: ********************************************************" >&2
|
||||
@echo "" >&2
|
||||
@git -c core.autocrlf=true --no-pager diff --binary
|
||||
|
|
Binary file not shown.
|
@ -15,6 +15,17 @@
|
|||
# limitations under the License.
|
||||
set -e
|
||||
|
||||
if ! git diff --quiet; then
|
||||
echo >&2
|
||||
echo "ERROR: ********************************************************" >&2
|
||||
echo "ERROR: The following differences were found after building." >&2
|
||||
echo "ERROR: Perhaps there is a difference in the flags for the" >&2
|
||||
echo "ERROR: CMakeLists.txt vs the tests/generate_code.sh script?" >&2
|
||||
echo "ERROR: ********************************************************" >&2
|
||||
echo >&2
|
||||
git diff --binary --exit-code
|
||||
fi
|
||||
|
||||
cd tests
|
||||
./generate_code.sh
|
||||
cd ..
|
||||
|
|
Binary file not shown.
|
@ -54,8 +54,8 @@ set TEST_NOINCL_FLAGS=%TEST_BASE_FLAGS% --no-includes
|
|||
..\%buildtype%\flatc.exe --rust %TEST_RUST_FLAGS% -I include_test -o include_test1 include_test/include_test1.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --rust %TEST_RUST_FLAGS% -I include_test -o include_test2 include_test/sub/include_test2.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-filenames . --bfbs-builtins -I include_test monster_test.fbs || goto FAIL
|
||||
..\%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
|
||||
..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-builtins -I include_test arrays_test.fbs || goto FAIL
|
||||
..\%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
|
||||
..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-filenames . --bfbs-builtins -I include_test arrays_test.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --jsonschema --schema -I include_test monster_test.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --cpp --java --csharp --jsonschema %TEST_NOINCL_FLAGS% %TEST_CPP_FLAGS% %TEST_CS_FLAGS% --scoped-enums arrays_test.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe --rust %TEST_RUST_FLAGS% -o arrays_test arrays_test.fbs || goto FAIL
|
||||
|
@ -98,7 +98,7 @@ if NOT "%MONSTER_EXTRA%"=="skip" (
|
|||
|
||||
cd ../samples
|
||||
..\%buildtype%\flatc.exe --cpp --lobster %TEST_BASE_FLAGS% %TEST_CPP_FLAGS% monster.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-builtins monster.fbs || goto FAIL
|
||||
..\%buildtype%\flatc.exe -b --schema --bfbs-comments --bfbs-filenames . --bfbs-builtins monster.fbs || goto FAIL
|
||||
cd ../reflection
|
||||
call generate_code.bat %1 %2 || goto FAIL
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS $TEST_TS_FLAGS -o namespace_te
|
|||
../flatc --rust $TEST_RUST_FLAGS -o include_test1 -I include_test include_test/include_test1.fbs
|
||||
../flatc --rust $TEST_RUST_FLAGS -o include_test2 -I include_test include_test/sub/include_test2.fbs
|
||||
../flatc -b --schema --bfbs-comments --bfbs-filenames . --bfbs-builtins -I include_test monster_test.fbs
|
||||
../flatc --cpp --bfbs-comments --bfbs-builtins --bfbs-gen-embed $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS -I include_test monster_test.fbs
|
||||
../flatc -b --schema --bfbs-comments --bfbs-builtins -I include_test arrays_test.fbs
|
||||
../flatc --cpp --bfbs-comments --bfbs-filenames . --bfbs-builtins --bfbs-gen-embed $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS -I include_test monster_test.fbs
|
||||
../flatc -b --schema --bfbs-comments --bfbs-filenames . --bfbs-builtins -I include_test arrays_test.fbs
|
||||
../flatc --jsonschema --schema -I include_test monster_test.fbs
|
||||
../flatc --cpp --java --kotlin --csharp --python $TEST_NOINCL_FLAGS $TEST_CPP_FLAGS $TEST_CS_FLAGS monster_extra.fbs monsterdata_extra.json
|
||||
../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
|
|||
cd ../samples
|
||||
../flatc --cpp --lobster $TEST_BASE_FLAGS $TEST_CPP_FLAGS monster.fbs
|
||||
../flatc --rust $TEST_RUST_FLAGS -o rust_generated monster.fbs
|
||||
../flatc -b --schema --bfbs-comments --bfbs-builtins monster.fbs
|
||||
../flatc -b --schema --bfbs-filenames . --bfbs-comments --bfbs-builtins monster.fbs
|
||||
cd ../reflection
|
||||
./generate_code.sh --cpp-std c++0x
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue