Opened 9 years ago
Closed 9 years ago
#12441 closed bug (fixed)
Unit tests hang on missing AppRunTestApp3a
Reported by: | simonsouth | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | - General | Version: | R1/Development |
Keywords: | unittests | Cc: | |
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
Running jam -q -j2 unittests
on x86_gcc2 hangs with
BApplication::RunTest9 /bin/sh: /Source/Haiku/github.com/simonsouth/haiku/generated-x86_gcc2/tests/haiku/x86/haiku/unittests/AppRunTestApp3a: No such file or directory
The relevant code is at AppRunTester.cpp:325 and there is in fact no AppRunTestApp3a.cpp in the repository.
Probably a file got missed from c9640d94a3b08cd4aaf02df8a4e008894b06f1e0.
Attachments (1)
Change History (6)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
If I read the Jamfile correctly, this file should be generated from AppRunTestApp3.cpp using the CopyBAppTestApp rule. I don't think a source file is missing, but maybe not everything was built.
Did you compile the tests using jam -q unittests
and did that finish without failure? Maybe there is a missing dependency between the unittests target and this particular app.
comment:3 by , 9 years ago
You're right, it's a missing dependency: There's nothing that makes the unittests
target dependent on these files, so they are not built when jam -q unittests
is run. Building them as individual targets, e.g. jam -q AppRunTestApp3a
, works fine.
Adding to the CopyBAppTestApp rule the line
Depends unittests : $(target) ;
makes things work, but is a poor solution since it embeds knowledge about the build system deep into the test cases.
What do you think of the attached patch? It
- Adds a new rule,
UnitTestDependency
, toTestRules
; and - Uses it in
testapps/Jamfile
to make theunittests
target depend on the copied files.
by , 9 years ago
Attachment: | 0001-unittests-Build-copied-BAppTest-files.patch added |
---|
Build copied BAppTest files as part of unittests target
comment:4 by , 9 years ago
patch: | 0 → 1 |
---|
The description should read "Running
UnitTester
...".