Opened 4 years ago

Closed 4 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:
Has a Patch: yes 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)

0001-unittests-Build-copied-BAppTest-files.patch (1.9 KB) - added by simonsouth 4 years ago.
Build copied BAppTest files as part of unittests target

Download all attachments as: .zip

Change History (6)

comment:1 Changed 4 years ago by simonsouth

The description should read "Running UnitTester...".

comment:2 Changed 4 years ago by pulkomandy

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 Changed 4 years ago by simonsouth

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, to TestRules; and
  • Uses it in testapps/Jamfile to make the unittests target depend on the copied files.

Changed 4 years ago by simonsouth

Build copied BAppTest files as part of unittests target

comment:4 Changed 4 years ago by simonsouth

Has a Patch: set

comment:5 Changed 4 years ago by pulkomandy

Resolution: fixed
Status: newclosed

Applied in hrev49748. Thanks!

Note: See TracTickets for help on using tickets.