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

regress/runtests fails for an out-of-source build #713

Open
ryandesign opened this issue Apr 5, 2024 · 1 comment
Open

regress/runtests fails for an out-of-source build #713

ryandesign opened this issue Apr 5, 2024 · 1 comment

Comments

@ryandesign
Copy link
Contributor

I can run the tests if I do an in-source build:

cd /Volumes/Shared/sipp
LDFLAGS=-L/opt/local/lib cmake .
make -j8
regress/runtests

But if I try an out-of-source build it fails:

cd /Volumes/Shared/sipp
mkdir build
cd build
LDFLAGS=-L/opt/local/lib cmake ..
make -j8
../regress/runtests

Each test prints an error like this:

github-#0018/../functions: line 32: /Volumes/Shared/sipp: is a directory
github-#0018/../functions: line 32: exec: /Volumes/Shared/sipp: cannot execute: Undefined error: 0

The function in question is:

sipp/regress/functions

Lines 12 to 28 in d1bdebe

# Allow SIPP=/path/to/sipp to override autodetection. Please use an
# absolute path. This allows you to test a different version.
get_sipp() {
if test -z "$SIPP"; then
# The cd in init() jumps to the directory where the test lives.
# We traverse upwards in the directory until we find the sipp
# binary.
tmp=`pwd`
while ! test -x "$tmp/sipp"; do
tmp=`dirname "$tmp"`
test "$tmp" = "/" && break
done
test -x "$tmp/sipp" || exit 1
SIPP="$tmp/sipp"
fi
echo "$SIPP"
}

As I understand this function, it successively checks higher and higher parent directories of the test directory for something called sipp that is executable. In my case, it stops when it finds the directory sipp into which I cloned the sipp repository, since the executable sipp is not in a parent directory of the test in an out-of-source build. If I rename the source directory so that it is not called sipp, then it fails with:

github-#0018/../functions: line 32: exec: : not found

It works if I specify the path to sipp:

SIPP=$PWD/sipp ../regress/runtests

So maybe the bug is just that the necessity of specifying SIPP for out-of-source builds is not documented, and the script doesn't exit earlier with a friendlier error message?

@wdoekes
Copy link
Member

wdoekes commented Apr 29, 2024

So maybe the bug is just that the necessity of specifying SIPP for out-of-source builds is not documented, and the script doesn't exit earlier with a friendlier error message?

Yeah. You're running into an unexpected edge case there.

PRs -- documentation and otherwise -- are welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants