From aa275fb893f0fc34df772b3ae7db9b1e98d427e8 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Mon, 15 May 2023 16:27:51 +0200 Subject: [PATCH] Replace whole repo with latest content from branch rhel-8.8.0 Content corresponds with RHEL dist-git commit b09f88c --- .gitignore | 5 ++++- tests/run-smoke-tests.sh | 8 +++++++ tests/run-unit-tests-on-installed-pkg.sh | 27 ++++++++++++++++++++++++ tests/tests.yml | 23 ++++++++++++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100755 tests/run-smoke-tests.sh create mode 100755 tests/run-unit-tests-on-installed-pkg.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index 7b7173a..549b4fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ -SOURCES/Babel-2.5.1.tar.gz +Babel-0.9.5.tar.gz +/Babel-0.9.6.tar.gz +/Babel-1.3.tar.gz +/Babel-2.3.4.tar.gz /Babel-2.5.1.tar.gz diff --git a/tests/run-smoke-tests.sh b/tests/run-smoke-tests.sh new file mode 100755 index 0000000..68eef0c --- /dev/null +++ b/tests/run-smoke-tests.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# smoke tests for the babel runtime + +# bail out on any error +set -e + +pybabel --list-locales diff --git a/tests/run-unit-tests-on-installed-pkg.sh b/tests/run-unit-tests-on-installed-pkg.sh new file mode 100755 index 0000000..053ccf0 --- /dev/null +++ b/tests/run-unit-tests-on-installed-pkg.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Run Babel's unit tests with the installed packages. + +# bail out if anything goes wrong +set -e + +# run in its own subdirectory without the whole sources underneath +mkdir testrun + +# first, copy over unit tests and make them find the installed modules and +# files as if they were an exploded source tarball +cp -r source/tests testrun/ + +# test_frontend needs python3-freezegun +rm testrun/tests/messages/test_frontend.py + +BABELDIR="$(python3 -c 'import os.path; import babel; print(os.path.dirname(babel.__file__))')" +ln -snf "$BABELDIR" testrun/babel + +pushd testrun + +# run the tests +export TZ=America/New_York +pytest-3 + +popd # testrun diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..a9c5680 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,23 @@ +--- +- hosts: localhost + roles: + - role: standard-test-source + tags: + - always + + - role: standard-test-basic + tags: + - atomic + - classic + required_packages: + - babel + - coreutils + - python3-babel + - python3-pytest + tests: + - smoke: + dir: . + run: ./run-smoke-tests.sh + - verify: + dir: . + run: ./run-unit-tests-on-installed-pkg.sh