Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from StackStorm:master #134

Open
wants to merge 2,071 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
2071 commits
Select commit Hold shift + click to select a range
7ceb204
add reason to skip
guzzijones Sep 11, 2024
4345a58
add reason for pytest
guzzijones Sep 11, 2024
c691cf1
add reason
guzzijones Sep 11, 2024
d356a75
attempt to change st2-run-packs-test with pytest instead of nose
guzzijones Sep 11, 2024
f1b5de2
fix st2-pack-test
guzzijones Sep 11, 2024
38a75a9
change to pytest args for st2runpackstests
guzzijones Sep 11, 2024
6ba7fdb
st2 run packs changes
guzzijones Sep 11, 2024
b64d0f5
add reason to pytest
guzzijones Sep 11, 2024
a91c200
copy pytest pin from lockfiles/st2.lock and remove duplicates in test…
cognifloyd Dec 18, 2024
d5d1199
Regenerate lockfiles/st2.lock to remove nose
cognifloyd Dec 18, 2024
595bbc4
Copy pinned versions from lockfiles/st2.lock to reqs files
cognifloyd Dec 18, 2024
6e71584
Bump pytest version in st2-run-pack-tests
cognifloyd Dec 18, 2024
514655d
Drop nosetest config files
cognifloyd Dec 18, 2024
0aa6696
Switch from nose-parallel to pytest-shard
cognifloyd Dec 18, 2024
ba461d7
Add reason= to pytest.mark.skipif
cognifloyd Dec 18, 2024
6c22de2
Add pack shared lib dir support to st2-run-pack-tests
cognifloyd Dec 18, 2024
7c44835
Makefile debug
cognifloyd Dec 18, 2024
c4522a3
Use pytest-custom_exit_code to pass when no tests are found
cognifloyd Dec 18, 2024
36f208b
Improve Makefile debug output
cognifloyd Dec 18, 2024
760f6cb
add changelog entry
cognifloyd Dec 19, 2024
da9e48d
Drop st2-run-pack-tests debug output
cognifloyd Dec 19, 2024
67bb6a2
CircleCI: Try updating PIP_VERSION in st2-packages on the fly
cognifloyd Dec 19, 2024
50c1776
CircleCI: Fix wheelhouse build failure on ubuntu focal
cognifloyd Dec 19, 2024
aa6e1d2
use pytest-test-groups over pytest-shard
cognifloyd Dec 19, 2024
332edcf
Inline pytest-test-groups to prepare to modify it
cognifloyd Dec 19, 2024
784dc7f
Use file path to calculate group instead of test id
cognifloyd Dec 19, 2024
79752cb
fmt with black
cognifloyd Dec 19, 2024
4201a33
Better bail out if pytest args not provided
cognifloyd Dec 19, 2024
c4dc652
test-group is now 0-based
cognifloyd Dec 19, 2024
983f63f
Switch test runner from nosetest to pytest (#6291)
cognifloyd Dec 19, 2024
fe09464
Enable testing with py3.10
nzlosh Mar 13, 2024
0b7a324
Test with py3.10, 3.11, 3.12
guzzijones Sep 11, 2024
22ff890
remove 3.12; ubuntu doesn't even have an install yet for it
guzzijones Sep 12, 2024
1299571
GHA: test more python versions
guzzijones Sep 13, 2024
06487f3
GHA: test with more python versions
cognifloyd Dec 19, 2024
000c7cd
GHA: fix syntax in .github/actions/setup-python
cognifloyd Dec 19, 2024
eeda2ba
GHA: simplify CI workflow matrix definition
cognifloyd Dec 19, 2024
84aee99
GHA: Fix typo in workflow on.pull_request.types def
cognifloyd Dec 19, 2024
5fbeb3b
pants: bump interpreter_constraints to include py3.11
cognifloyd Dec 19, 2024
04d7aba
pants generate-lockfiles --resolve=bandit --resolve=black --resolve=f…
cognifloyd Dec 19, 2024
3ff357e
pants generate-lockfiles --resolve=st2
cognifloyd Dec 19, 2024
708901e
GHA: fix matrix var name typo
cognifloyd Dec 19, 2024
0f5a52b
GHA: Run orquesta tests with py 3.10 and 3.11
cognifloyd Dec 19, 2024
4104cb2
add changelog entry
cognifloyd Dec 19, 2024
e11b4cc
Run benchmarks on PRs that touch benchmarks
cognifloyd Dec 17, 2024
8f2fc19
Bump pre-commit hook version for python 3.11 support
cognifloyd Dec 19, 2024
ae50851
Add official support for python 3.10 and 3.11 (#6292)
guzzijones Jan 10, 2025
03a1e69
pin urllib3 to version in lockfiles/st2.lock
cognifloyd Feb 4, 2025
3570e32
pin urllib3 to version in lockfiles/st2.lock (#6298)
cognifloyd Feb 6, 2025
6ea7224
Remove semi-colon processing code from all dist_utils.py (#6296)
skiedude Feb 8, 2025
12cd9ce
Switch from deprecated u2004 to u2204 image for github actions
nzlosh Feb 12, 2025
73392fd
bump to py3.8.12 which is the minimum available version on github ima…
nzlosh Feb 13, 2025
d037671
Regenerate lockfiles in an attempt to fix pex hash mismatches
nzlosh Feb 13, 2025
75f14c6
Install monogsh for ubuntu 22.04 GHA image
nzlosh Feb 14, 2025
7415bc2
bandit security warning fixes.
nzlosh Feb 14, 2025
2592d4f
Update requirements from pants lockfiles.
nzlosh Feb 16, 2025
9c1ba9a
Add missing version bumps
nzlosh Feb 17, 2025
18aabe8
st2api includes systemd unit
dennybaa Aug 20, 2015
fdafacd
st2actions with all system services
dennybaa Aug 25, 2015
025daaf
finalizing rpm packages specs
dennybaa Aug 25, 2015
166b587
removed linking of package services to /usr/bin
dennybaa Aug 25, 2015
0ebb38d
reactor services fixed in rpm package
dennybaa Aug 25, 2015
de4ddfa
added systemd services for rpm st2bundle
dennybaa Sep 8, 2015
e10a556
moving sources to st2 directory
dennybaa Sep 10, 2015
6b6738f
moving all packages into packages/
dennybaa Oct 30, 2015
2421938
Add files for the new st2garbagecollector service which is, for now, …
Kami Dec 22, 2015
48b5756
Also copy garbage collector init files to st2bundle directory.
Kami Dec 22, 2015
44f03f6
Fix the binary paths for garbage collector
Jan 14, 2016
1d1cc85
Add gunicorn and uwsgi to init files
enykeev Jan 22, 2016
a06e044
Start st2auth as gunicorn
enykeev Jan 25, 2016
460f734
removing apparently "FAR FUTURE PREOPTIMIZATION"
dennybaa Jan 20, 2016
4c8a885
fixing hardcoded arguments for st2auth, st2api services
dennybaa Jan 27, 2016
5a85eba
st2bundle renamed to st2
dennybaa Jan 30, 2016
e98906a
other code rewrites /usr/share/python to /opt/stackstorm
dennybaa Jan 30, 2016
302523d
Fix gunicorn graceful timeout
Feb 12, 2016
690c061
Add config files and other stuff for st2stream service.
Kami Feb 29, 2016
b7d9c30
Update st2api and st2auth to use sync gunicorn workers with 1 process…
Kami Feb 29, 2016
4c23959
For now use 1 worker, this should be plenty.
Kami Feb 29, 2016
6311e69
Use 2 worker processes for st2api.
Kami Feb 29, 2016
25dca39
running actionrunner as root:st2packs with umask 002 to provide group…
dennybaa Mar 2, 2016
086e852
set number of workers for st2api == 1
dennybaa Mar 4, 2016
6c878fa
Switch back to eventlet based gunicorn worker for st2api and st2auth.
Kami Apr 20, 2016
4f95843
Add service files to deb
Jul 13, 2016
9b7bd60
Fix default env directory
Jul 25, 2016
09d7352
Revert "Fixes for recent build container changes"
enykeev Jul 26, 2016
e064086
Use correct environment path for debian family systems
Aug 3, 2016
c52aed3
Update unit files for new REST services
Feb 17, 2017
0e25bf1
Add systemd socket files for Xenial
Mar 6, 2017
97a789d
Add systemd socket files for EL7
Mar 13, 2017
797a84a
Share private /tmp folder between actionrunner instances
Apr 25, 2017
ae60541
Add init files for all OSes for st2timersengine [ci skip]
Jun 18, 2018
5e66153
Typo in service file name
Jun 19, 2018
4563463
Add st2workflowengine service
m4dcoder Jun 21, 2018
0931407
Install and use special gunicorn logging config file for all gunicorn…
Kami Jun 27, 2018
bd07ef3
Adding scheduler
bigmstone Oct 9, 2018
c782c21
Make sure we log gunicorn st2api,st2auth,st2stream errors to a log fi…
Kami Apr 8, 2019
c1593ac
We can log gunicorn error logs to the existing API service log file.
Kami Apr 8, 2019
0aab4a4
Move static socket unit definitions to generators
nzlosh Jun 13, 2021
f4eb6a8
Fix typo
nzlosh Jun 13, 2021
4b42191
Fixed logging and formatting in systemd socket generators.
nzlosh Aug 22, 2021
da3f69a
Rewrite generator using python3
nzlosh Sep 22, 2021
2a85be4
Set executable for generators
nzlosh Sep 22, 2021
600fa10
rpm: Rely on %default_install to install *-generator from debian files
cognifloyd Oct 3, 2021
014b934
Add SourcPath= to generated .socket files
cognifloyd Oct 6, 2021
d7ecc8a
Relax ini parsing to allow duplicate entries.
nzlosh Oct 10, 2021
7a16dcb
Reorganize systemd files cherry-picked from st2-packages.git
cognifloyd Apr 13, 2023
e92e1cc
add changelog entry
cognifloyd Feb 16, 2025
79c02bc
Revert "Remove sysv" (st2actions/bin/runners.sh)
cognifloyd Jan 3, 2025
5a0e1f9
improved init detection mechanism in runners.sh wrapper
dennybaa Dec 26, 2015
384464e
fixing upstart false positive on centos 6.6 (since we don't ship upst…
dennybaa Jan 21, 2016
297edb1
default number of actionrunner workers is set to 10
dennybaa Jan 27, 2016
61b8506
beautify runners.sh
dennybaa Mar 4, 2016
16bd4cf
runners.sh fix xargs return code
dennybaa Mar 7, 2016
df672af
Remove more upstart logic artifacts
Jun 17, 2020
edeb91e
Reapply "Remove sysv" (st2actions/bin/runners.sh)
cognifloyd Jan 3, 2025
244fe8d
add changelog entry
cognifloyd Feb 14, 2025
1ee35ea
Switch from deprecated u2004 to u2204 image for github actions (#6301)
cognifloyd Feb 20, 2025
ff2e4d5
Merge branch 'master' into packaging-runners.sh
cognifloyd Feb 20, 2025
01a1161
Merge branch 'master' into packaging-systemd
cognifloyd Feb 20, 2025
d2d41b0
Packaging: Cherry-pick systemd files from st2-packages (#6303)
cognifloyd Feb 21, 2025
8c21b51
Merge branch 'master' into packaging-runners.sh
cognifloyd Feb 21, 2025
49f61fc
Packaging: Cherry-pick changes to runners.sh from st2-packages (#6302)
cognifloyd Feb 22, 2025
f350445
copy st2-auth-pam requirement from st2-packages
cognifloyd Apr 13, 2023
3d51b12
pants generate-lockfiles --resolve=st2
cognifloyd Feb 26, 2025
799fecd
copy updated pins from lockfiles/st2.lock to legacy requirements files
cognifloyd Feb 26, 2025
8e43d73
add merge conflict magnet
cognifloyd Feb 26, 2025
5049c39
regen conf/st2.conf.sample to accurately reflect inclusion of pam bac…
cognifloyd Feb 26, 2025
4988fbb
add st2-auth-backend-pam to legacy requirements files
cognifloyd Feb 27, 2025
bf22cf1
Copy dependency on st2-auth-backend-pam from st2-packages.git (#6306)
cognifloyd Feb 28, 2025
039bf1e
add pex_binary for st2 venv installation
cognifloyd Mar 28, 2023
347d9ab
move st2-py*.pex definition to packaging/BUILD
cognifloyd Apr 14, 2023
b2f5184
Pants: Use **parametrize(...) groups in packaging/BUILD
cognifloyd Dec 20, 2024
45eaf72
Packaging: Build /opt/stackstorm/st2 when running ./st2.pex
cognifloyd Dec 30, 2024
5dda82b
Pants: Move venv packaging targets to separate BUILD file
cognifloyd Dec 30, 2024
c751294
pants: Dry parametrization in packaging/BUILD.venv
cognifloyd Jan 3, 2025
acf2c9f
pants: handle 3.8 parametrization better
cognifloyd Feb 26, 2025
083ddf4
packaging: Use pex_binary(executable=...) instead of pex premable
cognifloyd Feb 26, 2025
18f470a
packaging: add note about pex_binary(include_requirements=...)
cognifloyd Feb 26, 2025
c7183fd
BUILD: add dependency rule to prevent st2 deps in install script
cognifloyd Feb 27, 2025
8a81662
add merge conflict magnet
cognifloyd Feb 27, 2025
c57f59d
Packaging: Add `pex_binary` BUILD metadata for building st2 venv (#6307)
cognifloyd Mar 5, 2025
161c641
Packaging: Add self-install archives for each pack to /opt/stackstorm…
cognifloyd Jan 3, 2025
e6da569
pants-plugins/pack_metadata: include Markdown files
cognifloyd Jan 3, 2025
940fb13
pants: cleanup makself_archive def and add docs links
cognifloyd Mar 5, 2025
fb27686
add merge conflict magnet
cognifloyd Mar 5, 2025
1a66cef
Packaging+pants: Add BUILD macros: ST2_PACKS_GROUP and ST2_SVC_USER
cognifloyd Jan 3, 2025
bba75f7
pants-plugins/pack_metadata: include md files in test resource counts
cognifloyd Mar 6, 2025
09409db
first build using wheels
dennybaa Jun 26, 2015
16cb769
updates
dennybaa Jun 26, 2015
816e38e
game on
dennybaa Jul 1, 2015
1a8e6bb
removed st2action debian/*.ex
dennybaa Jul 10, 2015
4057d1a
initial st2bundle commit
dennybaa Sep 7, 2015
265c178
moving sources to st2 directory
dennybaa Sep 10, 2015
faa8a58
moving all packages into packages/
dennybaa Oct 30, 2015
e9652d0
added buildnode var and fixed debian/preinst for st2bundle
dennybaa Nov 7, 2015
c6adfe1
minor permission fixes and cleanups for bundle
dennybaa Jan 22, 2016
6683d7e
st2bundle renamed to st2
dennybaa Jan 30, 2016
843c726
running actionrunner as root:st2packs with umask 002 to provide group…
dennybaa Mar 2, 2016
1a87a24
debian maintainer scripts update, reown packs/virtualenvs on upgrade …
dennybaa Mar 1, 2016
2c739a9
st2packs group is used in debian maintainer scripts
dennybaa Mar 2, 2016
acb873a
rpm preinst hook separted into a file
dennybaa Mar 2, 2016
6658117
verbosity on when creating users/groups on debian (same way as rabbit…
dennybaa Mar 2, 2016
37c120d
reseting permissions on upgrade using find opertaion (rpms require ch…
dennybaa Mar 2, 2016
b453ecf
minor permission fixes
dennybaa Mar 4, 2016
0321b31
debian postinst only permission setting (support recursive mode for n…
dennybaa Mar 7, 2016
6db66e3
Create config folder
Oct 27, 2016
4e0e1ad
Fix user's group creation for rpm
Nov 7, 2016
a3da953
Adding postinst register runners.
bigmstone Nov 21, 2016
7c93c99
Fixing postinst
bigmstone Nov 22, 2016
662a5eb
Adding fail-on-failure
bigmstone Nov 23, 2016
c3ea1cc
Fixing permissions for examples.
bigmstone Dec 5, 2016
8d57e70
Adding recursive for debian postinst.
bigmstone Dec 5, 2016
5536f8d
Add a space before ]. bash syntax fix
Dec 6, 2016
c1cb03f
Right bash finally
Dec 6, 2016
a7140d8
sh likes -eq more than ==
Dec 6, 2016
e37d82f
Adding orchestra runner to requirements.
bigmstone Jun 27, 2018
54a4f08
Revert "Adding orchestra runner to requirements"
enykeev Jun 28, 2018
e7e35db
register_runners post install step is not needed anymore.
Kami Sep 27, 2018
a4c974a
Only call set_permissions at upgrade action
May 14, 2019
ba88035
Upgrade "postrm purge" script invocation and make sure it deletes all…
Kami Feb 8, 2020
e908f9c
Perform a systemd daemon-reload after package installation to ensure …
nzlosh Oct 1, 2021
0cd21f9
move daemon-reload to postinst_script.spec
cognifloyd Oct 3, 2021
35fd98c
add comment about purpose of systemctl daemon-reload
cognifloyd Oct 6, 2021
15ad8ec
Ignore systemctl deamon-reload failure
arm4b Oct 18, 2021
c1b7670
Add overrides directory for pack overriding of meta data
amanda11 Feb 18, 2022
bbdd9f0
pants: move scriptlets copied from st2-packages.git
cognifloyd Mar 6, 2025
b2fd1b6
update changelog entry
cognifloyd Mar 6, 2025
0d6352b
pants tailor ::
cognifloyd Mar 6, 2025
83394be
pants: temporarily skip shellcheck on packaging/*/scripts
cognifloyd Mar 6, 2025
8f826bc
Packaging: Cherry-pick rpm/deb scriptlets from st2-packages (#6313)
cognifloyd Mar 7, 2025
cd1671e
Packaging: deb/pre-install.sh Remove dead code
cognifloyd Jan 7, 2025
7905713
Packaging: deb/*.sh Remove logrotate config handling
cognifloyd Jan 7, 2025
46c417f
Packaging: Remove set_permissions functions
cognifloyd Jan 7, 2025
cc6b0f5
add merge conflict magnet
cognifloyd Mar 7, 2025
1a86b23
Pants+Packaging: Add `makeself_archive` for each pack to facilitate i…
cognifloyd Mar 10, 2025
ad4b259
Merge branch 'master' into packaging-scriptlets_cleanup
cognifloyd Mar 10, 2025
16478d9
Packaging: remove dead/broken/legacy code from `packaging/{rpm,deb}/s…
cognifloyd Mar 10, 2025
41a7797
packaging: init mising packaging/{rpm,deb}/scripts
cognifloyd Mar 10, 2025
15bbd13
Packaging: Copy scriptlet lines from st2.spec in st2-packages
cognifloyd Mar 10, 2025
4ca7ec9
Packaging: Improve rpm scriptlet / deb maintainer script docs
cognifloyd Jan 8, 2025
8b77cdd
update changelog entry
cognifloyd Mar 10, 2025
a99117f
Packaging: Improve rpm scriptlet / deb maintainer script docs (#6315)
cognifloyd Mar 16, 2025
2f705fa
pants: add shfmt to format packaging scripts
cognifloyd Mar 10, 2025
11a63cd
pants: shfmt packaging/{deb,rpm}/scripts
cognifloyd Mar 10, 2025
3043e70
pants: minimize line change count in BUILD files
cognifloyd Mar 10, 2025
08fd2ba
add merge conflict magnet
cognifloyd Mar 16, 2025
df55287
Packaging: Add shfmt to format deb maintainer scripts / rpm scriptlet…
cognifloyd Mar 18, 2025
f0af1fe
Packaging: add bash shebang to rpm scriptlets
cognifloyd Mar 17, 2025
cd82f30
Packaging: clarify rpm/deb diffs in create_users func
cognifloyd Mar 17, 2025
9c0b25d
Packaging: manually expand rpm macros in rpm scriptlets
cognifloyd Mar 17, 2025
fb75e69
Packaging: simplify deb pre-install script
cognifloyd Mar 17, 2025
63e3f56
packaging: begin expanding DEBHELPERs
cognifloyd Mar 17, 2025
f1e5d15
packaging: forwards compat in deb scripts - no error on unknown arg
cognifloyd Mar 17, 2025
e189d12
Packaging: Improve systemd logic in deb/scripts/post-install.sh
cognifloyd Jan 8, 2025
fd6de4f
Packaging: Improve systemd logic in deb/scripts/{post,pre}-remove.sh
cognifloyd Jan 8, 2025
10ff255
Packaging: Finish systemd logic in rpm/scripts
cognifloyd Jan 8, 2025
ac7297b
Packaging: Use systemd-update-helper in rpm/scripts/post-install.sh
cognifloyd Jan 8, 2025
1f503a9
packaging: drop DEBHELPER comment in pre-install script
cognifloyd Mar 17, 2025
fae9319
add merge conflict magnet
cognifloyd Mar 18, 2025
775b902
packaging: enable shellcheck on deb/rpm scripts
cognifloyd Mar 19, 2025
986fab2
update pants to 2.24.2
cognifloyd Mar 6, 2025
a72b893
update pants to 2.25.0rc0
cognifloyd Mar 6, 2025
1382136
gha: pants now uses python 3.11
cognifloyd Mar 6, 2025
ef29291
gha: bump python versions to version cached in runner image
cognifloyd Mar 6, 2025
d9efa63
pants 2.25: pants.toml [test].extra_env_vars supports var name globs now
cognifloyd Mar 6, 2025
4e9d853
bump twine requirements
cognifloyd Mar 6, 2025
fe11ee9
Update init-pants action (py3.11 for pants-plugins)
cognifloyd Mar 6, 2025
b2e0123
add merge conflict magnet
cognifloyd Mar 6, 2025
6535ff5
Packaging: expand DEBHELPER in deb maintainer scripts and macros in r…
cognifloyd Mar 19, 2025
26356c6
Merge branch 'master' into pants-upgrade
cognifloyd Mar 19, 2025
b44c5c3
Pants: Upgrade from 2.23.0a0 to 2.25.0 (#6312)
cognifloyd Mar 19, 2025
149e891
Packaging: Build st2 virtualenv in post-install.sh scripts
cognifloyd Jan 8, 2025
b9a1fdf
Packaging: Extract st2 packs in post-install.sh scripts
cognifloyd Jan 8, 2025
9a2b69d
add merge conflict magnet
cognifloyd Mar 19, 2025
8290573
Pants: enable nFPM backend
cognifloyd Dec 30, 2024
3e20568
pants-plugins/release: separate version extraction rule
cognifloyd Jan 10, 2025
6b508a2
pants-plugins/release: Inject version for nfpm packages
cognifloyd Jan 10, 2025
5cbff1f
add merge conflict magnet
cognifloyd Mar 19, 2025
b7f9b6a
Packaging: extract venv (from pex) and packs (from archives) during r…
cognifloyd Mar 24, 2025
1424861
Merge branch 'master' into packaging-version_for_nfpm
cognifloyd Mar 24, 2025
8113a26
Add skiedude to Contributors (#6318) [ci skip]
cognifloyd Mar 24, 2025
1370f97
fix CircleCI build by constraining setuptools version
cognifloyd Mar 24, 2025
6b901f3
Packaging: Inject st2 version into rpm/deb packages (pants-plugins/re…
cognifloyd Mar 24, 2025
f0c65cf
pants-plugins/release: calculate packagecloud next release number
cognifloyd Jan 10, 2025
0df575c
pants: add requests dep for pants-plugins/release
cognifloyd Jan 10, 2025
7ecbac0
update changelog entry
cognifloyd Mar 24, 2025
903b7b4
Packaging: reimplement packagecloud release number script as a pants …
cognifloyd Mar 25, 2025
658af88
pants-plugins/release: add distro_id field to nfpm rpm/deb package ta…
cognifloyd Jan 13, 2025
00ff205
update changelog entry
cognifloyd Mar 25, 2025
1b81f88
Packaging: Add `distro_id` field to `nfpm_deb_package` and `nfpm_rpm_…
cognifloyd Mar 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change to pytest args for st2runpackstests
guzzijones authored and cognifloyd committed Dec 18, 2024

Verified

This commit was signed with the committer’s verified signature.
cognifloyd Jacob Floyd
commit 38a75a929d6f62a1d09c052566ecb2057b9501bc
22 changes: 2 additions & 20 deletions st2common/bin/st2-run-pack-tests
Original file line number Diff line number Diff line change
@@ -318,38 +318,20 @@ fi
echo "Running tests..."
# Note: We run pytests with "--exe" option so it also runs test files which are executable
# (pack install command automatically makes all the files, including test files executable)
PYTEST_OPTS=(-s -v --exe --immediate)
PYTEST_OPTS=(-s -v )

# Is test coverage reporting enabled?
if [ "${ENABLE_COVERAGE}" = true ]; then
verbose_log "Enabling pytests coverage"

# Base options to enable test coverage reporting
# --with-coverage : enables coverage reporting
# --cover-erase : removes old coverage reports before starting
PYTEST_OPTS+=(--with-coverage --cover-erase)

# Now, by default pytests reports test coverage for every module found
# in the $PYTHONPATH... as you can imagine this is not ideal and may contain
# a LOT of files.
# We can restrict pytest to only report on python files from certain
# directories by specifying those directories (absolute or relative) using
# the options: --cover-package=/absolte/path OR --cover-package=./relative/path

# For each of the sub-directory in the pack, excluding the "tests" directory
PACK_SUB_DIRS=$(find $PACK_PATH -mindepth 1 -maxdepth 1 -type d -and -not -name "tests")
for pack_sub_dir in $PACK_SUB_DIRS; do
verbose_log "Enabling pytests coverage for directory: $pack_sub_dir"
PYTEST_OPTS+=(--cover-package=$pack_sub_dir)
PYTEST_OPTS+=(--cov=$pack_sub_dir)
done # end for each $PACK_PYTHON_DIR
fi # end enable test coverage

# Should we pass in arguments to enable test timing
if [ "${ENABLE_TIMING}" = true ]; then
verbose_log "Enabling pytests timings"
PYTEST_OPTS+=(--with-timer)
fi

PYTEST=(pytest)
if head -n 1 $(command -v pytests) | grep -q ' -sE$'; then
# workaround pants+pex default of hermetic scripts so we can run pytests with PYTHONPATH