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 failure on macOS #245

Closed
tmm1 opened this issue Jul 12, 2018 · 9 comments
Closed

Test failure on macOS #245

tmm1 opened this issue Jul 12, 2018 · 9 comments
Labels

Comments

@tmm1
Copy link
Contributor

tmm1 commented Jul 12, 2018

Running org.bytedeco.javacpp.BuilderTest
Builder
Generating /Users/tmm1/fancybits/javacpp/jnijavacpp.cpp
Generating /Users/tmm1/fancybits/javacpp/target/test-classes/org/bytedeco/javacpp/jniBuilderTest.cpp
Nothing generated for /Users/tmm1/fancybits/javacpp/target/test-classes/org/bytedeco/javacpp/jniBuilderTest.cpp
Builder
Generating /Users/tmm1/fancybits/javacpp/jnijavacpp.cpp
Generating /Users/tmm1/fancybits/javacpp/target/test-classes/org/bytedeco/javacpp/jniBuilderTest.cpp
Compiling /Users/tmm1/fancybits/javacpp/target/test-classes/org/bytedeco/javacpp/macosx-x86_64-ext2/libjniBuilderTest.dylib
clang++ -I/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/include/darwin /Users/tmm1/fancybits/javacpp/target/test-classes/org/bytedeco/javacpp/jniBuilderTest.cpp /Users/tmm1/fancybits/javacpp/jnijavacpp.cpp -march=x86-64 -m64 -O3 -Wl,-rpath,@loader_path/. -Wall -fPIC -dynamiclib -undefined dynamic_lookup -o libjniBuilderTest.dylib -framework JavaVM
Deleting /Users/tmm1/fancybits/javacpp/target/test-classes/org/bytedeco/javacpp/jniBuilderTest.cpp
Deleting /Users/tmm1/fancybits/javacpp/jnijavacpp.cpp
Loader
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.541 sec <<< FAILURE! - in org.bytedeco.javacpp.BuilderTest
testExtensions(org.bytedeco.javacpp.BuilderTest)  Time elapsed: 0.541 sec  <<< FAILURE!
java.lang.AssertionError
	at org.bytedeco.javacpp.BuilderTest.testExtensions(BuilderTest.java:70)
@saudet saudet added the bug label Jul 12, 2018
@saudet
Copy link
Member

saudet commented Jul 13, 2018

This is interesting, this isn't happening on my Mac... If you run just that test, what does your target/test-classes/org/bytedeco/javacpp/ contain after it fails?

@tmm1
Copy link
Contributor Author

tmm1 commented Jul 16, 2018

target/test-classes/org/bytedeco/javacpp
├── AdapterTest$SharedData.class
├── AdapterTest$UniqueData.class
├── AdapterTest.class
├── AdapterTest.h
├── BuilderTest.class
├── EnumTest$ByteEnum.class
├── EnumTest$EnumCallback.class
├── EnumTest$IntEnum.class
├── EnumTest$LongEnum.class
├── EnumTest$ShortEnum.class
├── EnumTest.class
├── EnumTest.h
├── IndexerTest.class
├── PointerTest$1.class
├── PointerTest$2.class
├── PointerTest$TestFunction.class
├── PointerTest.class
├── macosx-x86_64
│   ├── libjniAdapterTest.dylib
│   ├── libjniEnumTest.dylib
│   ├── libjniIndexerTest.dylib
│   └── libjniPointerTest.dylib
├── macosx-x86_64-ext1
│   └── libjniBuilderTest.dylib
└── macosx-x86_64-ext2
    ├── libjniBuilderTest.dylib
    ├── libjniEnumTest.dylib
    ├── libjniIndexerTest.dylib
    └── libjniPointerTest.dylib

@tmm1
Copy link
Contributor Author

tmm1 commented Jul 16, 2018

One thing I noticed elsewhere was some places are using darwin-x86_64 while others are using macosx-x86_64

@saudet
Copy link
Member

saudet commented Jul 16, 2018

That contains files from tests other than BuilderTest, could you run mvn clean test -Dtest=BuilderTest?

Where do you see "darwin" popping up?

@saudet
Copy link
Member

saudet commented Jul 16, 2018

I see this is Java 9, maybe they changed a couple of things there, I should check.

@tmm1
Copy link
Contributor Author

tmm1 commented Jul 16, 2018

The darwin I noticed was probably in the android toolchain paths and not related.

mvn clean test -Dtest=BuilderTest passes. mvn clean test also works fine.

mvn clean; mvn test also works, but then a subsequent mvn test fails.

@saudet
Copy link
Member

saudet commented Jul 16, 2018

Ah, yes, that's "normal", it's not expecting to have some of the files in place at the start of the test. I should fix that...

@tmm1
Copy link
Contributor Author

tmm1 commented Jul 16, 2018

I ran into this originally when I was just trying to mvn install after making some changes, and all of a sudden the tests were failing.

saudet added a commit that referenced this issue Sep 13, 2018
…d fix flaky `BuilderTest` (issue #245)

 * Call `PointerScope.attach()` as part of `Pointer.deallocator()`, instead of `init()`, to support custom deallocators as well
 * Prevent `Parser` from appending annotations to setter methods of variables to satisfy the `Generator`
@saudet
Copy link
Member

saudet commented Sep 13, 2018

Finally fixed! Sorry about the trouble.

@saudet saudet closed this as completed Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants