diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-25 10:12:48 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-25 12:01:34 +0300 |
commit | 581a0db35dd4488548858ce7fa18257dd9b09d19 (patch) | |
tree | a2ea53345808f87b50959244fae19d719bea5376 /reference.md | |
parent | f612b399e5de7de24db1059962b8bf09b9511d98 (diff) | |
download | subplot-581a0db35dd4488548858ce7fa18257dd9b09d19.tar.gz |
fix: actually run the right subplot binary
This bug is dedicated to the screenwriters of the movie Inception.
We are verifying, in reference.md, that the version of Subplot in the
current source tree can still run the subplot from an older version of
Subplot. The goal is to make sure that what worked doesn't
accidentally stop working. We want to break backwards compatibility
only on purpose.
This commit fixes a problem in reference.md: it wasn't running the
Subplot binaries built from the current source tree, but ones
installed system-wide into /usr/bin. This was due to a fairly
intricate bug.
reference.md generates an outer test program, which clones a specific
older version of Subplot, and generates an inner test program, using
subplot.md from that older version. By default, that inner test
program uses the Subplot binaries built from the inner source tree,
but for reference.md we don't that.
To get the inner test program to use the right binaries, we need to
add the directory where they are to $PATH, and also set SUBPLOT_DIR in
the environment to any value. If SUBPLOT_DIR is set, the inner test
program won't generate a wrapper around the Subplot binaries that
forces use of the build location of the inner, older Subplot source
tree.
Diffstat (limited to 'reference.md')
-rw-r--r-- | reference.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/reference.md b/reference.md index f6620c8..49ea670 100644 --- a/reference.md +++ b/reference.md @@ -40,7 +40,7 @@ then command is successful #!/bin/bash set -euo pipefail -python3 src/test-inner.py --log test-inner.log --env "SUBPLOT_DIR=$(pwd)/target/debug" +python3 src/test-inner.py --log test-inner.log --env "PATH=$PATH" --env SUBPLOT_DIR=/ ~~~ |