@@ -20,6 +20,7 @@ fromager \
2020start_local_wheel_server
2121rm -rf " $OUTDIR /sdists-repo"
2222rm -rf " $OUTDIR /work-dir"
23+ rm " $OUTDIR /bootstrap.log"
2324
2425# run fromager with the cache wheel server pointing to the local wheel server
2526fromager \
@@ -32,6 +33,28 @@ fromager \
3233 --no-cleanup \
3334 bootstrap --cache-wheel-server-url=$WHEEL_SERVER_URL ' stevedore==5.2.0'
3435
36+ EXPECTED_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"
40+ )
41+
42+ for 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
54+ pass=false
55+ fi
56+ done
57+
3558EXPECTED_FILES="
3659$OUTDIR /wheels-repo/downloads/setuptools-*.whl
3760$OUTDIR /wheels-repo/downloads/pbr-*.whl
@@ -41,9 +64,9 @@ $OUTDIR/sdists-repo/downloads/stevedore-*.tar.gz
4164$OUTDIR /sdists-repo/downloads/setuptools-*.tar.gz
4265$OUTDIR /sdists-repo/downloads/pbr-*.tar.gz
4366
44- $OUTDIR /work-dir/pbr-*/pbr-*/pbr-*.dist-info/fromager-* .txt
45- $OUTDIR /work-dir/setuptools-*/setuptools-*/setuptools-*.dist-info/fromager-* .txt
46- $OUTDIR /work-dir/stevedore-*/stevedore-*/stevedore-*.dist-info/fromager-* .txt
67+ $OUTDIR /work-dir/pbr-*/*-requirements .txt
68+ $OUTDIR /work-dir/setuptools-*/*-requirements .txt
69+ $OUTDIR /work-dir/stevedore-*/*-requirements .txt
4770
4871$OUTDIR /work-dir/build-order.json
4972$OUTDIR /work-dir/constraints.txt
6184rm -rf " $OUTDIR /sdists-repo"
6285rm -rf " $OUTDIR /work-dir"
6386rm -rf " $OUTDIR /wheels-repo"
87+ rm " $OUTDIR /bootstrap.log"
6488
6589# run fromager with the cache wheel server pointing to the pypi server
6690fromager \
@@ -95,30 +119,18 @@ done
95119
96120$pass
97121
98- NOT_EXPECTED_FILES="
99- $OUTDIR /work-dir/pbr-*/pbr-*/pbr-*.dist-info/fromager-*.txt
100- $OUTDIR /work-dir/setuptools-*/setuptools-*/setuptools-*.dist-info/fromager-*.txt
101- $OUTDIR /work-dir/stevedore-*/stevedore-*/stevedore-*.dist-info/fromager-*.txt
102- "
103-
104- for pattern in $NOT_EXPECTED_FILES ; do
105- if [ -f " ${pattern} " ]; then
106- echo " Found $pattern " 1>&2
122+ for pattern in " ${EXPECTED_LOG_MESSAGES[@]} " ; do
123+ echo $pattern
124+ if grep -q " stevedore: $pattern " " $OUTDIR /bootstrap.log" ; then
125+ echo " FAIL: found log message stevedore: $pattern in $OUTDIR /bootstrap.log" 1>&2
107126 pass=false
108127 fi
109- done
110-
111- $pass
112-
113- EXPECTED_DIR="
114- $OUTDIR /work-dir/pbr-*/pbr-*/pbr-*.dist-info
115- $OUTDIR /work-dir/setuptools-*/setuptools-*/setuptools-*.dist-info
116- $OUTDIR /work-dir/stevedore-*/stevedore-*/stevedore-*.dist-info
117- "
118-
119- for pattern in $EXPECTED_DIR ; do
120- if [ -d " ${pattern} " ]; then
121- echo " Did not find $pattern " 1>&2
128+ if grep -q " pbr: $pattern " " $OUTDIR /bootstrap.log" ; then
129+ echo " FAIL: found log message pbr: $pattern in $OUTDIR /bootstrap.log" 1>&2
130+ pass=false
131+ fi
132+ if grep -q " setuptools: $pattern " " $OUTDIR /bootstrap.log" ; then
133+ echo " FAIL: found log message setuptools: $pattern in $OUTDIR /bootstrap.log" 1>&2
122134 pass=false
123135 fi
124136done
0 commit comments