fuzziqersoftware / phosg

C++ helpers for some common tasks
17 stars 15 forks source link

Some tests fail on PowerPC: 67% tests passed, 4 tests failed out of 12 #24

Open barracuda156 opened 1 year ago

barracuda156 commented 1 year ago
--->  Testing phosg
Executing:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build" && ctest test 
Test project /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
      Start  1: EncodingTest
 1/12 Test  #1: EncodingTest .....................   Passed    0.03 sec
      Start  2: FilesystemTest
 2/12 Test  #2: FilesystemTest ...................   Passed    0.03 sec
      Start  3: HashTest
 3/12 Test  #3: HashTest .........................Subprocess aborted***Exception:   0.06 sec
      Start  4: ImageTest
 4/12 Test  #4: ImageTest ........................Subprocess aborted***Exception:   0.05 sec
      Start  5: JSONTest
 5/12 Test  #5: JSONTest .........................   Passed    0.04 sec
      Start  6: KDTreeTest
 6/12 Test  #6: KDTreeTest .......................   Passed    0.04 sec
      Start  7: LRUSetTest
 7/12 Test  #7: LRUSetTest .......................   Passed    0.03 sec
      Start  8: LRUMapTest
 8/12 Test  #8: LRUMapTest .......................   Passed    0.03 sec
      Start  9: ProcessTest
 9/12 Test  #9: ProcessTest ......................Subprocess aborted***Exception:   0.27 sec
      Start 10: StringsTest
10/12 Test #10: StringsTest ......................Subprocess aborted***Exception:   0.04 sec
      Start 11: TimeTest
11/12 Test #11: TimeTest .........................   Passed    1.03 sec
      Start 12: UnitTestTest
12/12 Test #12: UnitTestTest .....................   Passed    0.04 sec

67% tests passed, 4 tests failed out of 12

Total Test time (real) =   1.77 sec

The following tests FAILED:
      3 - HashTest (Subprocess aborted)
      4 - ImageTest (Subprocess aborted)
      9 - ProcessTest (Subprocess aborted)
     10 - StringsTest (Subprocess aborted)
Errors while running CTest
Start testing: Mar 28 01:54 WIT
----------------------------------------------------------
1/12 Testing: EncodingTest
1/12 Test: EncodingTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/EncodingTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"EncodingTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/EncodingTest: all tests passed
<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"EncodingTest" end time: Mar 28 01:54 WIT
"EncodingTest" time elapsed: 00:00:00
----------------------------------------------------------

2/12 Testing: FilesystemTest
2/12 Test: FilesystemTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/FilesystemTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"FilesystemTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/FilesystemTest: all tests passed
<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"FilesystemTest" end time: Mar 28 01:54 WIT
"FilesystemTest" time elapsed: 00:00:00
----------------------------------------------------------

3/12 Testing: HashTest
3/12 Test: HashTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/HashTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"HashTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
terminate called after throwing an instance of 'expectation_failed'
  what():  failure at /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/phosg-e1bd000/src/HashTest.cc:22: string("\xD4\x1D\x8C\xD9\x8F\x00\xB2\x04\xE9\x80\x09\x98\xEC\xF8\x42\x7E", 16) != md5(nullptr, 0)
-- fnv1a64
-- md5
<end of output>
Test time =   0.06 sec
----------------------------------------------------------
Test Failed.
"HashTest" end time: Mar 28 01:54 WIT
"HashTest" time elapsed: 00:00:00
----------------------------------------------------------

4/12 Testing: ImageTest
4/12 Test: ImageTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/ImageTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"ImageTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
-- [8-bit/no-alpha] metadata
-- [8-bit/no-alpha] clear
-- [8-bit/no-alpha] axis-aligned lines
-- [8-bit/no-alpha] rectangles
-- [8-bit/no-alpha] non-axis-aligned lines
-- [8-bit/no-alpha] blit
-- [8-bit/no-alpha] mask_blit with color mask
-- [8-bit/no-alpha] copy
warning: reference file reference/ImageTestReference.no-alpha.8.ppm not found; skipping verification
-- [8-bit/no-alpha/ppm] save to disk
-- [8-bit/no-alpha/ppm] save in memory
-- [8-bit/no-alpha/ppm] compare with saved image
warning: reference file reference/ImageTestReference.no-alpha.8.bmp not found; skipping verification
-- [8-bit/no-alpha/bmp] save to disk
-- [8-bit/no-alpha/bmp] save in memory
-- [8-bit/no-alpha/bmp] compare with saved image
terminate called after throwing an instance of 'Image::unknown_format'
  what():  can't load image; type signature is 4D42
<end of output>
Test time =   0.05 sec
----------------------------------------------------------
Test Failed.
"ImageTest" end time: Mar 28 01:54 WIT
"ImageTest" time elapsed: 00:00:00
----------------------------------------------------------

5/12 Testing: JSONTest
5/12 Test: JSONTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/JSONTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"JSONTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
-- construction
-- equality
-- int/float equality
-- retrieval
-- retrieval + equality
-- retrieval + unwrap + equality
-- serialize
-- parse
-- parse list with trailing comma
-- parse dict with trailing comma
-- serialize/parse
-- format/parse
-- exceptions
-- comments
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/JSONTest: all tests passed
<end of output>
Test time =   0.04 sec
----------------------------------------------------------
Test Passed.
"JSONTest" end time: Mar 28 01:54 WIT
"JSONTest" time elapsed: 00:00:00
----------------------------------------------------------

6/12 Testing: KDTreeTest
6/12 Test: KDTreeTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/KDTreeTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"KDTreeTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
--     tree: size=1000, depth=22
--     tree: size=484, depth=20
--     tree: size=361, depth=17
-- basic
--   construction
--   insert
--   at/exists
--   within
--   erase
--   iterate
--   iterate+erase
--   ensure committed (iterate)
--   ensure committed (within)
-- randomized
--   construction/insert
--   within
--   erase 1
--   erase 2
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/KDTreeTest: all tests passed
<end of output>
Test time =   0.04 sec
----------------------------------------------------------
Test Passed.
"KDTreeTest" end time: Mar 28 01:54 WIT
"KDTreeTest" time elapsed: 00:00:00
----------------------------------------------------------

7/12 Testing: LRUSetTest
7/12 Test: LRUSetTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/LRUSetTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"LRUSetTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/LRUSetTest: all tests passed
<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"LRUSetTest" end time: Mar 28 01:54 WIT
"LRUSetTest" time elapsed: 00:00:00
----------------------------------------------------------

8/12 Testing: LRUMapTest
8/12 Test: LRUMapTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/LRUMapTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"LRUMapTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/LRUMapTest: all tests passed
<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"LRUMapTest" end time: Mar 28 01:54 WIT
"LRUMapTest" time elapsed: 00:00:00
----------------------------------------------------------

9/12 Testing: ProcessTest
9/12 Test: ProcessTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/ProcessTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"ProcessTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
-- popen_unique
-- name_for_pid
-- list_processes
-- run_process failure
terminate called after throwing an instance of 'expectation_failed'
  what():  failure at /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/phosg-e1bd000/src/ProcessTest.cc:60: 1 != WEXITSTATUS(ret.exit_status)
<end of output>
Test time =   0.27 sec
----------------------------------------------------------
Test Failed.
"ProcessTest" end time: Mar 28 01:54 WIT
"ProcessTest" time elapsed: 00:00:00
----------------------------------------------------------

10/12 Testing: StringsTest
10/12 Test: StringsTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/StringsTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"StringsTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
-- starts_with
-- ends_with
-- strip_trailing_zeroes
-- strip_trailing_whitespace
-- string_printf
lolz 1000 0x004F
-- split
-- split_context
-- skip_whitespace/skip_non_whitespace
-- skip_word
-- parse_data_string/format_data_string
terminate called after throwing an instance of 'expectation_failed'
  what():  failure at /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/phosg-e1bd000/src/StringsTest.cc:570: expected_data != output_data
<end of output>
Test time =   0.04 sec
----------------------------------------------------------
Test Failed.
"StringsTest" end time: Mar 28 01:54 WIT
"StringsTest" time elapsed: 00:00:00
----------------------------------------------------------

11/12 Testing: TimeTest
11/12 Test: TimeTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/TimeTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"TimeTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/TimeTest: all tests passed
<end of output>
Test time =   1.03 sec
----------------------------------------------------------
Test Passed.
"TimeTest" end time: Mar 28 01:54 WIT
"TimeTest" time elapsed: 00:00:01
----------------------------------------------------------

12/12 Testing: UnitTestTest
12/12 Test: UnitTestTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/UnitTestTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"UnitTestTest" start time: Mar 28 01:54 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/UnitTestTest: all tests passed
<end of output>
Test time =   0.04 sec
----------------------------------------------------------
Test Passed.
"UnitTestTest" end time: Mar 28 01:54 WIT
"UnitTestTest" time elapsed: 00:00:00
----------------------------------------------------------

End testing: Mar 28 01:54 WIT

P. S. Source code needs a number of fixes for the build to succeed in the first place: https://github.com/fuzziqersoftware/phosg/pull/23

fuzziqersoftware commented 1 year ago

I've pushed a change that will likely fix most of these - Hash, Image, and Strings had some assumptions about running on a little-endian host which are now fixed. Unfortunately I don't have a big-endian system handy on which to test (nor an emulator with a toolchain already set up), but I hope my change will suffice. Let me know if those are still broken.

ProcessTest is a different matter; it looks like it failed because the command false exited with a return code other than 1. Is there a binary for false on the system you're running this on? (run_process uses execve/execvp directly, so this will fail if false only exists as a builtin shell command.)

barracuda156 commented 1 year ago

@fuzziqersoftware Thank you! Which branch to use though? Master does not seem to be updated.

Re false: yes, apparently MacOS has it:

svacchanda$ which false
/usr/bin/false

(This is a system prefix, so it is a component of the OS.)

fuzziqersoftware commented 1 year ago

Apologies - apparently my push didn't go through last night. I've updated master just now.

If ProcessTest doesn't work, try changing {"false"} to some other command that should fail - maybe {"ls", "/missing/directory"}.

barracuda156 commented 1 year ago

@fuzziqersoftware Results from fe69599 (plus fixes from my PR, needed to fix the build):

75% tests passed, 3 tests failed out of 12

So ImageTest passed now, which failed earlier.

Start testing: Mar 29 01:33 WIT
----------------------------------------------------------
1/12 Testing: EncodingTest
1/12 Test: EncodingTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/EncodingTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"EncodingTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/EncodingTest: all tests passed
<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"EncodingTest" end time: Mar 29 01:33 WIT
"EncodingTest" time elapsed: 00:00:00
----------------------------------------------------------

2/12 Testing: FilesystemTest
2/12 Test: FilesystemTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/FilesystemTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"FilesystemTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/FilesystemTest: all tests passed
<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"FilesystemTest" end time: Mar 29 01:33 WIT
"FilesystemTest" time elapsed: 00:00:00
----------------------------------------------------------

3/12 Testing: HashTest
3/12 Test: HashTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/HashTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"HashTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
terminate called after throwing an instance of 'expectation_failed'
  what():  failure at /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/phosg-fe69599/src/HashTest.cc:22: string("\xD4\x1D\x8C\xD9\x8F\x00\xB2\x04\xE9\x80\x09\x98\xEC\xF8\x42\x7E", 16) != md5(nullptr, 0)
-- fnv1a64
-- md5
<end of output>
Test time =   0.07 sec
----------------------------------------------------------
Test Failed.
"HashTest" end time: Mar 29 01:33 WIT
"HashTest" time elapsed: 00:00:00
----------------------------------------------------------

4/12 Testing: ImageTest
4/12 Test: ImageTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/ImageTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"ImageTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
-- [8-bit/no-alpha] metadata
-- [8-bit/no-alpha] clear
-- [8-bit/no-alpha] axis-aligned lines
-- [8-bit/no-alpha] rectangles
-- [8-bit/no-alpha] non-axis-aligned lines
-- [8-bit/no-alpha] blit
-- [8-bit/no-alpha] mask_blit with color mask
-- [8-bit/no-alpha] copy
warning: reference file reference/ImageTestReference.no-alpha.8.ppm not found; skipping verification
-- [8-bit/no-alpha/ppm] save to disk
-- [8-bit/no-alpha/ppm] save in memory
-- [8-bit/no-alpha/ppm] compare with saved image
warning: reference file reference/ImageTestReference.no-alpha.8.bmp not found; skipping verification
-- [8-bit/no-alpha/bmp] save to disk
-- [8-bit/no-alpha/bmp] save in memory
-- [8-bit/no-alpha/bmp] compare with saved image
-- [16-bit/no-alpha] metadata
-- [16-bit/no-alpha] clear
-- [16-bit/no-alpha] axis-aligned lines
-- [16-bit/no-alpha] rectangles
-- [16-bit/no-alpha] non-axis-aligned lines
-- [16-bit/no-alpha] blit
-- [16-bit/no-alpha] mask_blit with color mask
-- [16-bit/no-alpha] copy
warning: reference file reference/ImageTestReference.no-alpha.16.ppm not found; skipping verification
-- [16-bit/no-alpha/ppm] save to disk
-- [16-bit/no-alpha/ppm] save in memory
-- [16-bit/no-alpha/ppm] compare with saved image
-- [32-bit/no-alpha] metadata
-- [32-bit/no-alpha] clear
-- [32-bit/no-alpha] axis-aligned lines
-- [32-bit/no-alpha] rectangles
-- [32-bit/no-alpha] non-axis-aligned lines
-- [32-bit/no-alpha] blit
-- [32-bit/no-alpha] mask_blit with color mask
-- [32-bit/no-alpha] copy
warning: reference file reference/ImageTestReference.no-alpha.32.ppm not found; skipping verification
-- [32-bit/no-alpha/ppm] save to disk
-- [32-bit/no-alpha/ppm] save in memory
-- [32-bit/no-alpha/ppm] compare with saved image
-- [64-bit/no-alpha] metadata
-- [64-bit/no-alpha] clear
-- [64-bit/no-alpha] axis-aligned lines
-- [64-bit/no-alpha] rectangles
-- [64-bit/no-alpha] non-axis-aligned lines
-- [64-bit/no-alpha] blit
-- [64-bit/no-alpha] mask_blit with color mask
-- [64-bit/no-alpha] copy
warning: reference file reference/ImageTestReference.no-alpha.64.ppm not found; skipping verification
-- [64-bit/no-alpha/ppm] save to disk
-- [64-bit/no-alpha/ppm] save in memory
-- [64-bit/no-alpha/ppm] compare with saved image
-- [8-bit/alpha] metadata
-- [8-bit/alpha] clear
-- [8-bit/alpha] axis-aligned lines
-- [8-bit/alpha] rectangles
-- [8-bit/alpha] non-axis-aligned lines
-- [8-bit/alpha] blit
-- [8-bit/alpha] mask_blit with color mask
-- [8-bit/alpha] copy
warning: reference file reference/ImageTestReference.alpha.8.ppm not found; skipping verification
-- [8-bit/alpha/ppm] save to disk
-- [8-bit/alpha/ppm] save in memory
-- [8-bit/alpha/ppm] compare with saved image
warning: reference file reference/ImageTestReference.alpha.8.bmp not found; skipping verification
-- [8-bit/alpha/bmp] save to disk
-- [8-bit/alpha/bmp] save in memory
-- [8-bit/alpha/bmp] compare with saved image
-- [16-bit/alpha] metadata
-- [16-bit/alpha] clear
-- [16-bit/alpha] axis-aligned lines
-- [16-bit/alpha] rectangles
-- [16-bit/alpha] non-axis-aligned lines
-- [16-bit/alpha] blit
-- [16-bit/alpha] mask_blit with color mask
-- [16-bit/alpha] copy
warning: reference file reference/ImageTestReference.alpha.16.ppm not found; skipping verification
-- [16-bit/alpha/ppm] save to disk
-- [16-bit/alpha/ppm] save in memory
-- [16-bit/alpha/ppm] compare with saved image
-- [32-bit/alpha] metadata
-- [32-bit/alpha] clear
-- [32-bit/alpha] axis-aligned lines
-- [32-bit/alpha] rectangles
-- [32-bit/alpha] non-axis-aligned lines
-- [32-bit/alpha] blit
-- [32-bit/alpha] mask_blit with color mask
-- [32-bit/alpha] copy
warning: reference file reference/ImageTestReference.alpha.32.ppm not found; skipping verification
-- [32-bit/alpha/ppm] save to disk
-- [32-bit/alpha/ppm] save in memory
-- [32-bit/alpha/ppm] compare with saved image
-- [64-bit/alpha] metadata
-- [64-bit/alpha] clear
-- [64-bit/alpha] axis-aligned lines
-- [64-bit/alpha] rectangles
-- [64-bit/alpha] non-axis-aligned lines
-- [64-bit/alpha] blit
-- [64-bit/alpha] mask_blit with color mask
-- [64-bit/alpha] copy
warning: reference file reference/ImageTestReference.alpha.64.ppm not found; skipping verification
-- [64-bit/alpha/ppm] save to disk
-- [64-bit/alpha/ppm] save in memory
-- [64-bit/alpha/ppm] compare with saved image
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/ImageTest: all tests passed
<end of output>
Test time =   0.13 sec
----------------------------------------------------------
Test Passed.
"ImageTest" end time: Mar 29 01:33 WIT
"ImageTest" time elapsed: 00:00:00
----------------------------------------------------------

5/12 Testing: JSONTest
5/12 Test: JSONTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/JSONTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"JSONTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
-- construction
-- equality
-- int/float equality
-- retrieval
-- retrieval + equality
-- retrieval + unwrap + equality
-- serialize
-- parse
-- parse list with trailing comma
-- parse dict with trailing comma
-- serialize/parse
-- format/parse
-- exceptions
-- comments
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/JSONTest: all tests passed
<end of output>
Test time =   0.04 sec
----------------------------------------------------------
Test Passed.
"JSONTest" end time: Mar 29 01:33 WIT
"JSONTest" time elapsed: 00:00:00
----------------------------------------------------------

6/12 Testing: KDTreeTest
6/12 Test: KDTreeTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/KDTreeTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"KDTreeTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
--     tree: size=1000, depth=20
--     tree: size=487, depth=20
--     tree: size=377, depth=20
-- basic
--   construction
--   insert
--   at/exists
--   within
--   erase
--   iterate
--   iterate+erase
--   ensure committed (iterate)
--   ensure committed (within)
-- randomized
--   construction/insert
--   within
--   erase 1
--   erase 2
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/KDTreeTest: all tests passed
<end of output>
Test time =   0.05 sec
----------------------------------------------------------
Test Passed.
"KDTreeTest" end time: Mar 29 01:33 WIT
"KDTreeTest" time elapsed: 00:00:00
----------------------------------------------------------

7/12 Testing: LRUSetTest
7/12 Test: LRUSetTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/LRUSetTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"LRUSetTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/LRUSetTest: all tests passed
<end of output>
Test time =   0.04 sec
----------------------------------------------------------
Test Passed.
"LRUSetTest" end time: Mar 29 01:33 WIT
"LRUSetTest" time elapsed: 00:00:00
----------------------------------------------------------

8/12 Testing: LRUMapTest
8/12 Test: LRUMapTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/LRUMapTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"LRUMapTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/LRUMapTest: all tests passed
<end of output>
Test time =   0.04 sec
----------------------------------------------------------
Test Passed.
"LRUMapTest" end time: Mar 29 01:33 WIT
"LRUMapTest" time elapsed: 00:00:00
----------------------------------------------------------

9/12 Testing: ProcessTest
9/12 Test: ProcessTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/ProcessTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"ProcessTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
-- popen_unique
-- name_for_pid
-- list_processes
-- run_process failure
terminate called after throwing an instance of 'expectation_failed'
  what():  failure at /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/phosg-fe69599/src/ProcessTest.cc:60: 1 != WEXITSTATUS(ret.exit_status)
<end of output>
Test time =   0.22 sec
----------------------------------------------------------
Test Failed.
"ProcessTest" end time: Mar 29 01:33 WIT
"ProcessTest" time elapsed: 00:00:00
----------------------------------------------------------

10/12 Testing: StringsTest
10/12 Test: StringsTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/StringsTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"StringsTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
-- starts_with
-- ends_with
-- strip_trailing_zeroes
-- strip_trailing_whitespace
-- string_printf
lolz 1000 0x004F
-- split
-- split_context
-- skip_whitespace/skip_non_whitespace
-- skip_word
-- parse_data_string/format_data_string
-- format_size
-- format_duration
-- parse_size
-- escape_quotes
-- escape_url
-- [print_data] one line
-- [print_data] multiple lines, last line partial
-- [print_data] with offset width flags
-- [print_data] automatic offset width
-- [print_data] with address
-- [print_data] with non-aligned address
-- [print_data] short data with non-aligned address
-- [print_data] short data with non-aligned address near beginning
-- [print_data] short data with non-aligned address near end
-- [print_data] without ascii
-- [print_data] with floats
expected:
0000000107B50FE0 |                                     00 00 00 00 |                                                   0
0000000107B50FF0 | 56 6F 6D C3 00 00 00 00 A5 5B C8 40 00 00 00 00 |      -237.43            0       6.2612            0
0000000107B51000 | 00 00 00 00 6E 37 9F 43 3E 51 3F 40             |            0       318.43       2.9893             
actual:
0000000107B50FE0 |                                     00 00 00 00 |                                                   0
0000000107B50FF0 | 56 6F 6D C3 00 00 00 00 A5 5B C8 40 00 00 00 00 |   6.5814e+13            0  -1.9063e-16            0
0000000107B51000 | 00 00 00 00 6E 37 9F 43 3E 51 3F 40             |            0   1.4207e+28      0.20434             
terminate called after throwing an instance of 'expectation_failed'
  what():  failure at /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/phosg-fe69599/src/StringsTest.cc:32: expected_output != output_data
<end of output>
Test time =   0.06 sec
----------------------------------------------------------
Test Failed.
"StringsTest" end time: Mar 29 01:33 WIT
"StringsTest" time elapsed: 00:00:00
----------------------------------------------------------

11/12 Testing: TimeTest
11/12 Test: TimeTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/TimeTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"TimeTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/TimeTest: all tests passed
<end of output>
Test time =   1.03 sec
----------------------------------------------------------
Test Passed.
"TimeTest" end time: Mar 29 01:33 WIT
"TimeTest" time elapsed: 00:00:01
----------------------------------------------------------

12/12 Testing: UnitTestTest
12/12 Test: UnitTestTest
Command: "/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/UnitTestTest"
Directory: /opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build
"UnitTestTest" start time: Mar 29 01:33 WIT
Output:
----------------------------------------------------------
/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_phosg/phosg/work/build/UnitTestTest: all tests passed
<end of output>
Test time =   0.03 sec
----------------------------------------------------------
Test Passed.
"UnitTestTest" end time: Mar 29 01:33 WIT
"UnitTestTest" time elapsed: 00:00:00
----------------------------------------------------------

End testing: Mar 29 01:33 WIT

Other three still fail.

In ProcessTest I only changes this: auto ret = run_process({"/missing/directory"}, nullptr, false);. Something else needed?

P. S. At the moment I do testing on Rosetta, so if anything in the code relies on physical cpu detection (and not arch-related defines), it may cause failures. One such instance is in CMakeLists, but it is inconsequential, from what I can say.

barracuda156 commented 1 year ago

Apologies - apparently my push didn't go through last night. I've updated master just now.

If ProcessTest doesn't work, try changing {"false"} to some other command that should fail - maybe {"ls", "/missing/directory"}.

@fuzziqersoftware If you could take a look again at this, when you have time, that would be great. Improvement is there, but not everything got fixed.