@@ -7,96 +7,89 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
77source " $SCRIPTDIR /common.sh"
88pass=true
99
10+ DIST=setuptools
11+ VER=78.1.0
12+
13+ # ###############################################################################
1014# run fromager once to build wheels that can be used by a local wheel server
15+
1116fromager \
17+ --debug \
1218 --log-file=" $OUTDIR /bootstrap.log" \
1319 --error-log-file=" $OUTDIR /fromager-errors.log" \
1420 --sdists-repo=" $OUTDIR /sdists-repo" \
1521 --wheels-repo=" $OUTDIR /wheels-repo" \
1622 --work-dir=" $OUTDIR /work-dir" \
1723 --settings-dir=" $SCRIPTDIR /changelog_settings" \
18- bootstrap ' stevedore==5.2.0 '
24+ bootstrap " $DIST == $VER "
1925
20- start_local_wheel_server
21- rm -rf " $OUTDIR /sdists-repo"
26+ # ###############################################################################
27+ # run fromager again to verify that we pick up the existing wheels in the output directory
28+
29+ # Remove build work-dir and wheel server dir, but not the sdist or wheel repos
2230rm -rf " $OUTDIR /work-dir"
31+ rm -rf " $OUTDIR /wheels-repo/simple"
2332rm " $OUTDIR /bootstrap.log"
2433
25- # run fromager with the cache wheel server pointing to the local wheel server
2634fromager \
35+ --debug \
2736 --log-file=" $OUTDIR /bootstrap.log" \
2837 --error-log-file=" $OUTDIR /fromager-errors.log" \
2938 --sdists-repo=" $OUTDIR /sdists-repo" \
3039 --wheels-repo=" $OUTDIR /wheels-repo" \
3140 --work-dir=" $OUTDIR /work-dir" \
3241 --settings-dir=" $SCRIPTDIR /changelog_settings" \
33- --no-cleanup \
34- bootstrap --cache-wheel-server-url=$WHEEL_SERVER_URL ' stevedore==5.2.0'
42+ bootstrap --cache-wheel-server-url=" https://pypi.org/simple" " $DIST ==$VER "
3543
3644EXPECTED_LOG_MESSAGES=(
37- " loading build sdist dependencies from build-sdist-requirements.txt"
38- " loading build backend dependencies from build-backend-requirements.txt"
39- " loading build system dependencies from build-system-requirements.txt"
45+ " $DIST : looking for existing wheel for version $VER with build tag () in"
46+ " $DIST : found existing wheel"
4047)
41-
4248for pattern in " ${EXPECTED_LOG_MESSAGES[@]} " ; do
43- echo $pattern
44- if ! grep -q " stevedore: $pattern " " $OUTDIR /bootstrap.log" ; then
45- echo " FAIL: Did not find log message stevedore: $pattern in $OUTDIR /bootstrap.log" 1>&2
46- pass=false
47- fi
48- if ! grep -q " pbr: $pattern " " $OUTDIR /bootstrap.log" ; then
49- echo " FAIL: Did not find log message pbr: $pattern in $OUTDIR /bootstrap.log" 1>&2
50- pass=false
51- fi
52- if ! grep -q " setuptools: $pattern " " $OUTDIR /bootstrap.log" ; then
53- echo " FAIL: Did not find log message setuptools: $pattern in $OUTDIR /bootstrap.log" 1>&2
49+ if ! grep -q " $pattern " " $OUTDIR /bootstrap.log" ; then
50+ echo " FAIL: Did not find log message $pattern in $OUTDIR /bootstrap.log" 1>&2
5451 pass=false
5552 fi
5653done
54+ $pass
5755
58- EXPECTED_FILES="
59- $OUTDIR /wheels-repo/downloads/setuptools-*.whl
60- $OUTDIR /wheels-repo/downloads/pbr-*.whl
61- $OUTDIR /wheels-repo/downloads/stevedore-*.whl
62-
63- $OUTDIR /work-dir/pbr-*/*-requirements.txt
64- $OUTDIR /work-dir/setuptools-*/*-requirements.txt
65- $OUTDIR /work-dir/stevedore-*/*-requirements.txt
66-
67- $OUTDIR /work-dir/build-order.json
68- $OUTDIR /work-dir/constraints.txt
69- "
56+ UNEXPECTED_LOG_MESSAGES=(
57+ " $DIST : checking if wheel was already uploaded to https://pypi.org/simple"
58+ )
7059
71- for pattern in $EXPECTED_FILES ; do
72- if [ ! -f " ${ pattern} " ] ; then
73- echo " Did not find $pattern " 1>&2
60+ for pattern in " ${UNEXPECTED_LOG_MESSAGES[@]} " ; do
61+ if grep -q " $pattern " " $OUTDIR /bootstrap.log " ; then
62+ echo " FAIL: Found log message $pattern in $OUTDIR /bootstrap.log " 1>&2
7463 pass=false
7564 fi
7665done
77-
7866$pass
7967
68+ # ###############################################################################
69+
70+ # run fromager with the cache wheel server pointing to the pypi server and
71+ # verify we can pick it up from there
72+
73+ start_local_wheel_server
8074rm -rf " $OUTDIR /sdists-repo"
8175rm -rf " $OUTDIR /work-dir"
82- rm -rf " $OUTDIR /wheels-repo"
76+ rm -rf " $OUTDIR /wheels-repo/build"
77+ rm -rf " $OUTDIR /wheels-repo/download"
8378rm " $OUTDIR /bootstrap.log"
8479
85- # run fromager with the cache wheel server pointing to the pypi server
8680fromager \
81+ --debug \
8782 --log-file=" $OUTDIR /bootstrap.log" \
8883 --error-log-file=" $OUTDIR /fromager-errors.log" \
8984 --sdists-repo=" $OUTDIR /sdists-repo" \
9085 --wheels-repo=" $OUTDIR /wheels-repo" \
9186 --work-dir=" $OUTDIR /work-dir" \
9287 --settings-dir=" $SCRIPTDIR /changelog_settings" \
9388 --no-cleanup \
94- bootstrap --cache-wheel-server-url=" https://pypi.org/simple" ' stevedore==5.2.0 '
89+ bootstrap --cache-wheel-server-url=" https://pypi.org/simple" " $DIST == $VER "
9590
9691EXPECTED_FILES="
9792$OUTDIR /wheels-repo/downloads/setuptools-*.whl
98- $OUTDIR /wheels-repo/downloads/pbr-*.whl
99- $OUTDIR /wheels-repo/downloads/stevedore-*.whl
10093
10194$OUTDIR /work-dir/build-order.json
10295$OUTDIR /work-dir/constraints.txt
@@ -111,18 +104,16 @@ done
111104
112105$pass
113106
114- for pattern in " ${EXPECTED_LOG_MESSAGES[@]} " ; do
107+ UNEXPECTED_LOG_MESSAGES=(
108+ " $DIST : loading build sdist dependencies from build-sdist-requirements.txt"
109+ " $DIST : loading build backend dependencies from build-backend-requirements.txt"
110+ " $DIST : loading build system dependencies from build-system-requirements.txt"
111+ )
112+
113+ for pattern in " ${UNEXPECTED_LOG_MESSAGES[@]} " ; do
115114 echo $pattern
116- if grep -q " stevedore: $pattern " " $OUTDIR /bootstrap.log" ; then
117- echo " FAIL: found log message stevedore: $pattern in $OUTDIR /bootstrap.log" 1>&2
118- pass=false
119- fi
120- if grep -q " pbr: $pattern " " $OUTDIR /bootstrap.log" ; then
121- echo " FAIL: found log message pbr: $pattern in $OUTDIR /bootstrap.log" 1>&2
122- pass=false
123- fi
124- if grep -q " setuptools: $pattern " " $OUTDIR /bootstrap.log" ; then
125- echo " FAIL: found log message setuptools: $pattern in $OUTDIR /bootstrap.log" 1>&2
115+ if grep -q " $pattern " " $OUTDIR /bootstrap.log" ; then
116+ echo " FAIL: found log message $pattern in $OUTDIR /bootstrap.log" 1>&2
126117 pass=false
127118 fi
128119done
0 commit comments