From fe3ff1eeb3043cae997e3f2811f3a30ecc4f70e3 Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Fri, 5 May 2023 14:55:39 -0400 Subject: [PATCH 1/6] replace whitespaces with commas in tox.ini passenv --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7866842..b5dfedd 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ skip_missing_interpreters = true [testenv] description = run tests -passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_* +passenv = TOXENV,CI,TRAVIS,TRAVIS_*,CODECOV_* deps = virtualenv!=20.0.22 pre-commit From 28cc67716aa250d050acb19a75d3ec6629ef35fb Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Fri, 5 May 2023 14:58:50 -0400 Subject: [PATCH 2/6] fixing broken flake8 link --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fe6e4c6..c209e23 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - - repo: https://gitlab.com/pycqa/flake8 + - repo: https://github.com/pycqa/flake8 rev: 5.0.4 hooks: - id: flake8 From d4aa33098739a8dfe8964fbbc69f72659e173063 Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Fri, 5 May 2023 15:04:34 -0400 Subject: [PATCH 3/6] adjust allowlist_externals syntax --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index b5dfedd..749963f 100644 --- a/tox.ini +++ b/tox.ini @@ -31,9 +31,9 @@ commands = python -m pip install -r {homedir}/tmp/plugins/emu/requirements.txt coverage run -p -m pytest --tb=short --rootdir={homedir}/tmp {homedir}/tmp/plugins/emu/tests -W ignore::DeprecationWarning allowlist_externals = - /usr/bin/sudo * - /usr/bin/git * - /usr/bin/cp * + /usr/bin/sudo + /usr/bin/git + /usr/bin/cp [testenv:style] deps = From 8e3d578ed54df0e8612976a5687d2c726f0855ad Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Fri, 5 May 2023 15:06:51 -0400 Subject: [PATCH 4/6] add /bin/rm to allowlist_externals --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 749963f..45fd937 100644 --- a/tox.ini +++ b/tox.ini @@ -34,6 +34,7 @@ allowlist_externals = /usr/bin/sudo /usr/bin/git /usr/bin/cp + /bin/rm [testenv:style] deps = From 4162fc2fd9c0784c6d95fff0fe1fbe0f98fa1692 Mon Sep 17 00:00:00 2001 From: Daniel Kim Date: Fri, 5 May 2023 15:14:02 -0400 Subject: [PATCH 5/6] fix directories --- tox.ini | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tox.ini b/tox.ini index 45fd937..cb4dd06 100644 --- a/tox.ini +++ b/tox.ini @@ -22,14 +22,14 @@ deps = pytest-aiohttp coverage codecov -changedir = {homedir}/tmp +changedir = /tmp/caldera commands = - /usr/bin/git clone https://github.com/mitre/caldera.git --recursive {homedir}/tmp - /bin/rm -rf {homedir}/tmp/plugins/emu - python -m pip install -r {homedir}/tmp/requirements.txt - /usr/bin/cp -R {toxinidir} {homedir}/tmp/plugins/emu - python -m pip install -r {homedir}/tmp/plugins/emu/requirements.txt - coverage run -p -m pytest --tb=short --rootdir={homedir}/tmp {homedir}/tmp/plugins/emu/tests -W ignore::DeprecationWarning + /usr/bin/git clone https://github.com/mitre/caldera.git --recursive /tmp/caldera + /bin/rm -rf /tmp/caldera/plugins/emu + python -m pip install -r /tmp/caldera/requirements.txt + /usr/bin/cp -R {toxinidir} /tmp/caldera/plugins/emu + python -m pip install -r /tmp/caldera/plugins/emu/requirements.txt + coverage run -p -m pytest --tb=short --rootdir=/tmp/caldera /tmp/caldera/plugins/emu/tests -W ignore::DeprecationWarning allowlist_externals = /usr/bin/sudo /usr/bin/git @@ -48,7 +48,7 @@ commands = deps = coverage skip_install = true -changedir = {homedir}/tmp +changedir = /tmp/caldera commands = coverage combine coverage html @@ -59,7 +59,7 @@ deps = coveralls coverage skip_install = true -changedir = {homedir}/tmp +changedir = /tmp/caldera commands = coverage combine coverage xml From 90be96f5fb0fa20c6412f2bfbf7c664f6e67ec5a Mon Sep 17 00:00:00 2001 From: Daniel Matthews <58484522+uruwhy@users.noreply.github.com> Date: Thu, 1 Jun 2023 10:41:16 -0400 Subject: [PATCH 6/6] update tox.ini remove sudo from externals --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index cb4dd06..0d80529 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,6 @@ commands = python -m pip install -r /tmp/caldera/plugins/emu/requirements.txt coverage run -p -m pytest --tb=short --rootdir=/tmp/caldera /tmp/caldera/plugins/emu/tests -W ignore::DeprecationWarning allowlist_externals = - /usr/bin/sudo /usr/bin/git /usr/bin/cp /bin/rm