-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #466 from shubhbapna/throw-error-constraints-file
throw an error there is no version that works for all dependencies when generating the constraints file
- Loading branch information
Showing
5 changed files
with
68 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
# -*- indent-tabs-mode: nil; tab-width: 2; sh-indentation: 2; -*- | ||
|
||
# Tests full bootstrap and installation of a complex package, without | ||
# worrying about isolating the tools from upstream sources or | ||
# restricting network access during the build. This allows us to test | ||
# the overall logic of the build tools separately from the isolated | ||
# build pipelines. | ||
|
||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
source "$SCRIPTDIR/common.sh" | ||
|
||
# passing settings to bootstrap but should have 0 effect on it | ||
fromager \ | ||
--log-file="$OUTDIR/bootstrap.log" \ | ||
--error-log-file="$OUTDIR/fromager-errors.log" \ | ||
--sdists-repo="$OUTDIR/sdists-repo" \ | ||
--wheels-repo="$OUTDIR/wheels-repo" \ | ||
--work-dir="$OUTDIR/work-dir" \ | ||
--settings-dir="$SCRIPTDIR/changelog_settings" \ | ||
bootstrap 'stevedore==5.2.0' 'stevedore==4.0.0' || true | ||
|
||
pass=true | ||
|
||
# Check for log message that the override is loaded | ||
if ! grep -q "Could not produce a pip compatible constraints file" "$OUTDIR/bootstrap.log"; then | ||
echo "FAIL: did not throw an error when generating an incorrect constraints file" 1>&2 | ||
pass=false | ||
fi | ||
|
||
$pass | ||
|
||
if [ ! -f "$OUTDIR/work-dir/constraints.txt" ]; then | ||
echo "Did not find $OUTDIR/work-dir/constraints.txt" 1>&2 | ||
pass=false | ||
fi | ||
|
||
$pass | ||
|
||
EXPECTED_LINES=" | ||
pbr==6.1.0 | ||
# ERROR | ||
stevedore==4.0.0 | ||
stevedore==5.2.0 | ||
" | ||
|
||
for pattern in $EXPECTED_LINES; do | ||
if ! grep -q "${pattern}" "$OUTDIR/work-dir/constraints.txt"; then | ||
echo "Did not find $pattern in constraints file" 1>&2 | ||
pass=false | ||
fi | ||
done | ||
|
||
$pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters