Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

external tests should not fail if source is not available. #2523

Open
markus2330 opened this issue Mar 22, 2019 · 2 comments
Open

external tests should not fail if source is not available. #2523

markus2330 opened this issue Mar 22, 2019 · 2 comments
Labels

Comments

@markus2330
Copy link
Contributor

check_external_example and check_external_example_highlevel may fail when you run the tests without the source code, e.g.:

ELEKTRA CHECK EXTERNAL HIGHLEVEL

/usr/bin/pkg-config
Check if script tests the correct version
+ echo 'Testing build with cmake'
Testing build with cmake
+ cd /builddir/build/BUILD/elektra-0.8.26/examples/highlevel
/usr/lib64/elektra/tool_exec/check_external_example_highlevel: Zeile 1097: cd: /builddir/build/BUILD/elektra-0.8.26/examples/highlevel: Datei oder Verzeichnis nicht gefunden
+ mkdir build
mkdir: das Verzeichnis „build“ kann nicht angelegt werden: Keine Berechtigung
+ cd build
/usr/lib64/elektra/tool_exec/check_external_example_highlevel: Zeile 1099: cd: build: Datei oder Verzeichnis nicht gefunden
+ cmake ../cmake
@kodebach
Copy link
Member

Yes, my last change to these tests didn't take packaged versions of Elektra into account...

The tests rely on Elektra being installed and the source directory still being available, because they read the example sources from there. Instead we should just install the example sources to $prefix/share/elektra/examples ($prefix being the CMake install prefix), so they get shipped with Elektra. Then the tests can just read the sources from there.

@markus2330
Copy link
Contributor Author

Btw. the tests also rely on having build tools available (cmake,...)

We definitely should turn these tests off if the source dir cannot be found.

@markus2330 markus2330 added testing errors in tests without implication on real usage and removed build labels Apr 12, 2020
@kodebach kodebach mentioned this issue Oct 15, 2022
22 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants