Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants