Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix 'make test' in out-of-source build #12

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

Totktonada
Copy link
Member

There were two problems with out-of-source build around make test:

  1. The runtest.sh helper script was not found.
  2. The built module was not found by the Lua test (require failed).

Both are fixed here.

Reported-by: Yaroslav Dynnikov yaroslav.dynnikov@tarantool.org

There were two problems with out-of-source build around `make test`:

1. The runtest.sh helper script was not found.
2. The built module was not found by the Lua test (`require` failed).

Both are fixed here.

Reported-by: Yaroslav Dynnikov <yaroslav.dynnikov@tarantool.org>
This was referenced May 28, 2021
@Totktonada Totktonada requested review from olegrok and rosik May 28, 2021 18:03
Copy link

@olegrok olegrok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patch. Fun fact:

➜  tuple-keydef git:(Totktonada/fix-make-test-oob) ✗ tarantool --version
Tarantool 2.7.2-0-g4d8c068
Target: Darwin-x86_64-Release
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/tarantool/2.7.2.0_1 -DENABLE_BACKTRACE=ON
Compiler: /usr/bin/clang /usr/bin/clang++
C_FLAGS: -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2 -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-gnu-alignof-expression -Wno-cast-function-type
CXX_FLAGS: -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -fopenmp -msse2 -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type
➜  tuple-keydef git:(Totktonada/fix-make-test-oob) ✗ make test
Running tests...
Test project /Users/o.babin/Projects/tuple-keydef
    Start 1: tuple_keydef.test.lua
1/1 Test #1: tuple_keydef.test.lua ............   Passed    0.07 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.08 sec

But

➜  tuple-keydef git:(Totktonada/fix-make-test-oob) ✗ tarantool --version
Tarantool Enterprise 2.8.1-0-ge2a1ec0c2-r402-macos
Target: Darwin-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/opt/actions-runners/sdk_01/_work/sdk/sdk/build.sdk/tarantool-2.8/static-build/tarantool-prefix -DENABLE_BACKTRACE=TRUE
Compiler: /Library/Developer/CommandLineTools/usr/bin/cc /Library/Developer/CommandLineTools/usr/bin/c++
C_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -msse2 -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-gnu-alignof-expression
CXX_FLAGS: -Wno-unknown-pragmas -fexceptions -funwind-tables -fno-omit-frame-pointer -fno-stack-protector -fno-common -msse2 -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-invalid-offsetof -Wno-gnu-alignof-expression
➜  tuple-keydef git:(Totktonada/fix-make-test-oob) ✗ make test
Running tests...
Test project /Users/o.babin/Projects/tuple-keydef
    Start 1: tuple_keydef.test.lua
1/1 Test #1: tuple_keydef.test.lua ............***Failed    0.09 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.10 sec

The following tests FAILED:
	  1 - tuple_keydef.test.lua (Failed)
Errors while running CTest
Output from these tests are in: /Users/o.babin/Projects/tuple-keydef/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
make: *** [test] Error 8
➜  tuple-keydef git:(Totktonada/fix-make-test-oob) ✗ cat Testing/Temporary/LastTest.log
Start testing: May 28 21:13 MSK
----------------------------------------------------------
1/1 Testing: tuple_keydef.test.lua
1/1 Test: tuple_keydef.test.lua
Command: "/Users/o.babin/Projects/tuple-keydef/test/runtest.sh" "tuple_keydef.test.lua"
Directory: /Users/o.babin/Projects/tuple-keydef/test
"tuple_keydef.test.lua" start time: May 28 21:13 MSK
Output:
----------------------------------------------------------
++ dirname /Users/o.babin/Projects/tuple-keydef/test/runtest.sh
+ TESTDIR=/Users/o.babin/Projects/tuple-keydef/test
+ '[' -z '' ']'
+ WORKDIR=/Users/o.babin/Projects/tuple-keydef/test/var
+ mkdir -p /Users/o.babin/Projects/tuple-keydef/test/var
+ cd /Users/o.babin/Projects/tuple-keydef/test/var
+ rm -f 00000000000000000000.xlog 00000000000000000000.snap
+ tarantool /Users/o.babin/Projects/tuple-keydef/test/tuple_keydef.test.lua
LuajitError: ...o.babin/Projects/tuple-keydef/test/tuple_keydef.test.lua:36: attempt to compare nil with number
fatal error, exiting the event loop
<end of output>
Test time =   0.09 sec
----------------------------------------------------------
Test Failed.
"tuple_keydef.test.lua" end time: May 28 21:13 MSK
"tuple_keydef.test.lua" time elapsed: 00:00:00
----------------------------------------------------------

End testing: May 28 21:13 MSK

But anyway it's a problem of test version parser not for test engine itself. Your changes look good to me.

@Totktonada
Copy link
Member Author

@olegrok Thanks! I fixed it in PR #13.

Totktonada pushed a commit that referenced this pull request May 29, 2021
This is temporary commit fixup until PR #12 will be merged.
@rosik rosik mentioned this pull request May 30, 2021
Copy link
Contributor

@rosik rosik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've brought another simpler version of this fix #14. The decision which to merge is up to you.

@Totktonada
Copy link
Member Author

I think that it worth to push this PR as fix and your one as refactoring. See my comment in PR #14 for details.

@Totktonada Totktonada merged commit db45782 into master Jun 3, 2021
@Totktonada Totktonada deleted the Totktonada/fix-make-test-oob branch June 3, 2021 00:29
@Totktonada Totktonada mentioned this pull request Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants