Skip to content

Commit 4a43c39

Browse files
committed
tests/embedded: check that embedders can autogen using the hwloc embedded tarball
Build an embedded tarball from the original tarball and use it instead for all tests. The intend is to have our CI detect problems such as open-mpi/ompi#7363 whenever the list of non-embedded dist directories changes. Signed-off-by: Brice Goglin <[email protected]> (cherry picked from commit 88fc5b4)
1 parent 67b2c03 commit 4a43c39

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

tests/hwloc/embedded/run-embedded-tests.sh

+21-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
#
33
# Copyright © 2010 Cisco Systems, Inc. All rights reserved.
4-
# Copyright © 2019 Inria. All rights reserved.
4+
# Copyright © 2019-2020 Inria. All rights reserved.
55
# See COPYING in top-level directory.
66
#
77
# Simple script to help test embedding:
@@ -78,17 +78,27 @@ print Got tarball: $tarball
7878
ver=`basename $tarball | sed -e 's/^hwloc-//' -e 's/\.tar\..*$//'`
7979
print Got version: $ver
8080

81-
# Extract
81+
# Extract and build an embedded tarball
82+
print Removing the old standalone directory...
83+
rm -rf standalone
84+
mkdir standalone
85+
cd standalone
8286
print Extracting tarball...
83-
rm -rf hwloc-$ver
8487
if test "`echo $tarball | grep .tar.bz2`" != ""; then
85-
try tar jxf $tarball
88+
try tar jxf ../$tarball
8689
else
87-
try tar zxf $tarball
90+
try tar zxf ../$tarball
8891
fi
89-
90-
print Removing old tree...
91-
rm -rf hwloc-tree
92+
cd hwloc-$ver
93+
print Building embedded tarball...
94+
try ./configure --enable-embedded-mode
95+
try make dist
96+
cd ../..
97+
98+
# Extract embedded tarball for real use
99+
print Extracting the embedded tarball...
100+
rm -rf hwloc-$tree hwloc-$ver
101+
try tar jxf standalone/hwloc-$ver/hwloc-$ver.tar.bz2
92102
mv hwloc-$ver hwloc-tree
93103

94104
# Autogen
@@ -107,16 +117,9 @@ cd ..
107117
rm -rf build
108118

109119
# Now whack the tree and do a clean VPATH
110-
print Re-extracting tarball...
111-
rm -rf hwloc-$ver
112-
if test "`echo $tarball | grep .tar.bz2`" != ""; then
113-
try tar jxf $tarball
114-
else
115-
try tar zxf $tarball
116-
fi
117-
118-
print Removing old tree...
119-
rm -rf hwloc-tree
120+
print Re-extracting the embedded tarball...
121+
rm -rf hwloc-tree hwloc-$ver
122+
try tar jxf standalone/hwloc-$ver/hwloc-$ver.tar.bz2
120123
mv hwloc-$ver hwloc-tree
121124

122125
# Autogen

0 commit comments

Comments
 (0)