3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

gnu: flightgear: Prepare to run test suite.

* gnu/packages/games.scm (flightgear)[arguments]: Add phase to build
test binary. Add phase to skip some failing tests. Move 'check phase to
after 'install-data.
This commit is contained in:
Efraim Flashner 2021-11-03 23:56:01 +02:00
parent b93e06a964
commit 19c38b2acc
Signed by untrusted user: efraim
GPG key ID: 41AAE7DCCA3D8351

View file

@ -9331,11 +9331,25 @@ and also provides the base for the FlightGear Flight Simulator.")
(string-append "-DFG_DATA_DIR="
(assoc-ref %outputs "out")
"/share/flightgear"))
;; TODO: test cannot be run because the "run_test_suite" executable
;; does not seem to be built.
;; TODO: test suite segfaults.
#:tests? #f
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-some-tests
(lambda _
(substitute* "test_suite/unit_tests/Instrumentation/test_gps.hxx"
(("CPPUNIT_TEST\\(testLongLegWestbound\\);" all)
(string-append "// " all))
(("CPPUNIT_TEST\\(testFinalLegCourse\\);" all)
(string-append "// " all)))))
(add-after 'build 'build-test-suite
(lambda* args
((assoc-ref %standard-phases 'build)
#:make-flags (list "fgfs_test_suite"))))
;; Test suite needs access to FGData so run it after 'install.
(delete 'check)
(add-after 'install-data 'check
(assoc-ref %standard-phases 'check))
(add-after 'install 'install-data
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((share (string-append (assoc-ref outputs "out") "/share/flightgear")))