[haiku-bugs] Re: [Haiku] #12441: Unit tests hang on missing AppRunTestApp3a

  • From: "simonsouth" <trac@xxxxxxxxxxxx>
  • Date: Sun, 01 Nov 2015 09:50:05 -0000

#12441: Unit tests hang on missing AppRunTestApp3a
--------------------------+----------------------------
Reporter: simonsouth | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: - General | Version: R1/Development
Resolution: | Keywords: unittests
Blocked By: | Blocking:
Has a Patch: 0 | Platform: x86
--------------------------+----------------------------

Comment (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 [http://cgit.haiku-

os.org/haiku/tree/src/tests/kits/app/bapplication/testapps/Jamfile?id=hrev49746#n35
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.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12441#comment:3>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: