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

Unit tests fail to run when CMake out-of-source build is used: basic_ios::clear: iostream error #281

Closed
barracuda156 opened this issue Jun 21, 2023 · 5 comments

Comments

@barracuda156
Copy link

--->  Testing charls
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_charls/charls/work/build/test" && ./charlstest -unittest 
Test Conformance
==> Unit test failed due to external problem: basic_ios::clear: iostream error
Command failed:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_charls/charls/work/build/test" && ./charlstest -unittest 
Exit code: 1
Error: Failed to test charls: command execution failed

What do I do wrong?

@malaterre
Copy link
Contributor

PPCSnowLeopardPorts seems a bit old today :)

In any case current gcc runs fine on linux/powerpc32 (Debian OS)

@barracuda156
Copy link
Author

PPCSnowLeopardPorts seems a bit old today :)

In any case current gcc runs fine on linux/powerpc32 (Debian OS)

@malaterre I have GCC 12.2.0 on this machine, 12.3.0 on another. Not strictly current, but current enough :)
We do not get such failures normally, and it is not SDK-related, AFAIK. (Yeah, 10.6 is dated, but C++ works fine up to C++20.)

@barracuda156
Copy link
Author

@malaterre Ok, the issue was that for w/e reason tests do not run when CMake uses out-of-source build (which is a default behavior). Switching to in-source build, I get this:

--->  Testing charls
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_graphics_charls/charls/work/charls-2.4.2" && test/charlstest -unittest 
Test Conformance
Conformance test:test/conformance/t8c0e0.jls
Conformance test:test/conformance/t8c1e0.jls
Conformance test:test/conformance/t8c2e0.jls
Conformance test:test/conformance/t8c0e3.jls
Conformance test:test/conformance/t8c1e3.jls
Conformance test:test/conformance/t8c2e3.jls
Conformance test:test/conformance/t8nde0.jls
Conformance test:test/conformance/t8nde3.jls
Conformance test:test/conformance/t16e0.jls
Conformance test:test/conformance/t16e3.jls
Test Traits
Windows bitmap BGR/BGRA output
Test Small buffer
Test Color transform equivalence on HP images
Conformance test:test/jlsimage/banny_normal.jls
Conformance test:test/jlsimage/banny_HP1.jls
Conformance test:test/jlsimage/banny_HP2.jls
Conformance test:test/jlsimage/banny_HP3.jls
Test Annex H3
RoundTrip test for: noise, bit depth: 8
Size:       512x512, Encode time:28 ms, Decode time:30 ms, Bits per sample:8.5, Decode rate:8.8 M/s
RoundTrip test for: noise, bit depth: 7
Size:       512x512, Encode time:37 ms, Decode time:27 ms, Bits per sample:7.5, Decode rate:9.7 M/s
RoundTrip test for: noise, bit depth: 6
Size:       512x512, Encode time:34 ms, Decode time:22 ms, Bits per sample:6.5, Decode rate:12 M/s
RoundTrip test for: noise, bit depth: 5
Size:       512x512, Encode time:32 ms, Decode time:20 ms, Bits per sample:5.5, Decode rate:13 M/s
RoundTrip test for: noise, bit depth: 4
Size:       512x512, Encode time:31 ms, Decode time:19 ms, Bits per sample:4.5, Decode rate:14 M/s
RoundTrip test for: noise, bit depth: 3
Size:       512x512, Encode time:30 ms, Decode time:18 ms, Bits per sample:3.5, Decode rate:14 M/s
RoundTrip test for: noise, bit depth: 2
Size:       512x512, Encode time:30 ms, Decode time:19 ms, Bits per sample:2.5, Decode rate:14 M/s
RoundTrip test for: noise, bit depth: 16
Size:       512x512, Encode time:20 ms, Decode time:23 ms, Bits per sample:8.3, Decode rate:12 M/s
RoundTrip test for: noise, bit depth: 15
Size:       512x512, Encode time:25 ms, Decode time:24 ms, Bits per sample:7.8, Decode rate:11 M/s
RoundTrip test for: noise, bit depth: 14
Size:       512x512, Encode time:24 ms, Decode time:23 ms, Bits per sample:7.3, Decode rate:11 M/s
RoundTrip test for: noise, bit depth: 13
Size:       512x512, Encode time:22 ms, Decode time:22 ms, Bits per sample:6.8, Decode rate:12 M/s
RoundTrip test for: noise, bit depth: 12
Size:       512x512, Encode time:17 ms, Decode time:20 ms, Bits per sample:6.3, Decode rate:13 M/s
RoundTrip test for: noise, bit depth: 11
Size:       512x512, Encode time:21 ms, Decode time:21 ms, Bits per sample:5.8, Decode rate:13 M/s
RoundTrip test for: noise, bit depth: 10
Size:       512x512, Encode time:21 ms, Decode time:21 ms, Bits per sample:5.3, Decode rate:13 M/s
RoundTrip test for: noise, bit depth: 9
Size:       512x512, Encode time:18 ms, Decode time:19 ms, Bits per sample:4.4, Decode rate:14 M/s
RoundTrip test for: TestNoiseImageWithCustomReset
Size:       512x512, Encode time:20 ms, Decode time:23 ms, Bits per sample:8.3, Decode rate:12 M/s
Test robustness
Test Legacy API
Test LegacyAPIs
Test JpegLsReadHeader
LegacyAPI JpegLsReadHeader:test/conformance/t8c0e0.jls
LegacyAPI JpegLsReadHeader:test/conformance/t8c1e0.jls
LegacyAPI JpegLsReadHeader:test/conformance/t8c2e0.jls
LegacyAPI JpegLsReadHeader:test/conformance/t8c0e3.jls
LegacyAPI JpegLsReadHeader:test/conformance/t8c1e3.jls
LegacyAPI JpegLsReadHeader:test/conformance/t8c2e3.jls
LegacyAPI JpegLsReadHeader:test/conformance/t8nde0.jls
LegacyAPI JpegLsReadHeader:test/conformance/t8nde3.jls
LegacyAPI JpegLsReadHeader:test/conformance/t16e0.jls
LegacyAPI JpegLsReadHeader:test/conformance/t16e3.jls
LegacyAPI JpegLsReadHeader:test/tulips-gray-8bit-512-512-hp-encoder.jls

Does it look okay?

@barracuda156 barracuda156 changed the title Unit test failed due to external problem: basic_ios::clear: iostream error Unit test fail when CMake out-of-source build is used Jun 21, 2023
@barracuda156 barracuda156 changed the title Unit test fail when CMake out-of-source build is used Unit tests fail to run when CMake out-of-source build is used: basic_ios::clear: iostream error Jun 21, 2023
@malaterre
Copy link
Contributor

Does it look okay?

Looks like it ! congrats

@barracuda156
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants