Skip to content

Commit

Permalink
Final tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumol committed Oct 11, 2024
1 parent 14972ad commit fc4d5f2
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,30 +260,35 @@ command_test() {
# shellcheck disable=SC2034 # Only used through compgen.
help_text_compat="Run the test suite from chevah/compat master."
command_compat() {
local new_python_conf="$PYTHON_BUILD_VERSION.$PYTHIA_VERSION"
local new_python_ver="$PYTHON_BUILD_VERSION.$PYTHIA_VERSION"
execute pushd "$BUILD_DIR"

# This is quite hackish, as compat is arm-twisted to use the local version.
echo "::group::Compat tests"
echo "#### Running chevah's compat tests... ####"
echo "## Removing any pre-existing compat code... ##"
execute rm -rf compat/
echo "## Cloning compat's master branch... ##"
execute git clone https://github.com/chevah/compat.git --depth=1 -b master
execute pushd compat
# Copy over current pythia stuff, as some changes might require it.
execute cp ../../pythia.{conf,sh} ./
# Patch compat to use the newly-built Python, then copy it to cache/.
echo -e "\nPYTHON_CONFIGURATION=default@${new_python_conf}" >> pythia.conf
# Make sure everything is done from scratch in the current dir.
unset CHEVAH_CACHE CHEVAH_BUILD
# Copy dist file to local cache, if existing.
execute mkdir cache
cp ../../"$DIST_DIR"/"$PYTHON_BUILD_VERSION.$PYTHIA_VERSION"/* cache/
# Some tests might still fail due to causes not related to the new Python.
execute ./pythia.sh deps
execute ./pythia.sh test_normal
execute ./pythia.sh test_ci2

# Make sure everything is done from scratch in the current dir.
echo "## Unsetting CHEVAH_CACHE and CHEVAH_BUILD... ##"
unset CHEVAH_CACHE CHEVAH_BUILD
# Copy over current pythia stuff, as some changes might require it.
echo "## Patching compat code ot use current pythia version... ##"
execute cp ../../pythia.{conf,sh} ./
# Patch compat to use the current's branch version.
echo -e "\nPYTHON_CONFIGURATION=default@${new_python_ver}" >>pythia.conf
# Copy dist file to local cache, if existing.
execute mkdir cache
cp ../../"$DIST_DIR"/"$PYTHON_BUILD_VERSION.$PYTHIA_VERSION"/* cache/
# Some tests could fail due to causes not related to the new Python.
echo "## Getting compat deps... ##"
execute ./pythia.sh deps
echo "## Running normal compat tests... ##"
execute ./pythia.sh test -vs normal
echo "## Running ci2 compat tests... ##"
execute ./pythia.sh test_ci2
execute popd
echo "::endgroup::"
}
Expand Down

0 comments on commit fc4d5f2

Please sign in to comment.