Skip to content

Commit

Permalink
tests/embedded: check that embedders can autogen using the hwloc embe…
Browse files Browse the repository at this point in the history
…dded 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 <Brice.Goglin@inria.fr>
(cherry picked from commit 9af4e4d361c0f9e0e44a587c4b9b364b724265a6)
  • Loading branch information
bgoglin committed Feb 19, 2020
1 parent ecea0a6 commit 6f6c792
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions tests/hwloc/embedded/run-embedded-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright © 2010 Cisco Systems, Inc. All rights reserved.
# Copyright © 2019 Inria. All rights reserved.
# Copyright © 2019-2020 Inria. All rights reserved.
# See COPYING in top-level directory.
#
# Simple script to help test embedding:
Expand Down Expand Up @@ -78,17 +78,27 @@ print Got tarball: $tarball
ver=`basename $tarball | sed -e 's/^hwloc-//' -e 's/\.tar\..*$//'`
print Got version: $ver

# Extract
# Extract and build an embedded tarball
print Removing the old standalone directory...
rm -rf standalone
mkdir standalone
cd standalone
print Extracting tarball...
rm -rf hwloc-$ver
if test "`echo $tarball | grep .tar.bz2`" != ""; then
try tar jxf $tarball
try tar jxf ../$tarball
else
try tar zxf $tarball
try tar zxf ../$tarball
fi

print Removing old tree...
rm -rf hwloc-tree
cd hwloc-$ver
print Building embedded tarball...
try ./configure --enable-embedded-mode
try make dist
cd ../..

# Extract embedded tarball for real use
print Extracting the embedded tarball...
rm -rf hwloc-$tree hwloc-$ver
try tar jxf standalone/hwloc-$ver/hwloc-$ver.tar.bz2
mv hwloc-$ver hwloc-tree

# Autogen
Expand All @@ -107,16 +117,9 @@ cd ..
rm -rf build

# Now whack the tree and do a clean VPATH
print Re-extracting tarball...
rm -rf hwloc-$ver
if test "`echo $tarball | grep .tar.bz2`" != ""; then
try tar jxf $tarball
else
try tar zxf $tarball
fi

print Removing old tree...
rm -rf hwloc-tree
print Re-extracting the embedded tarball...
rm -rf hwloc-tree hwloc-$ver
try tar jxf standalone/hwloc-$ver/hwloc-$ver.tar.bz2
mv hwloc-$ver hwloc-tree

# Autogen
Expand Down

0 comments on commit 6f6c792

Please sign in to comment.