From 5f78e56aad09a35c375fc3025cb373d93bddae4d Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 03:12:39 +0800 Subject: [PATCH 1/8] added syntax errors --- pytest_example.py | 5 +++-- pyunit.py | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pytest_example.py b/pytest_example.py index 5e9e835..e3a090d 100644 --- a/pytest_example.py +++ b/pytest_example.py @@ -1,11 +1,12 @@ # content of test_sample.py def inc(x): +def inc(x,y): return x + 1 -def foo(): - assert True +def foo(x): + assert x def test_foo(): foo() diff --git a/pyunit.py b/pyunit.py index 7ac7e7f..9e365af 100644 --- a/pyunit.py +++ b/pyunit.py @@ -1,5 +1,4 @@ import unittest -import xmlrunner class SimpleTestCase(unittest.TestCase): From 5ce1307be9c86d4315c4b92a29b9b5325b808341 Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 03:28:21 +0800 Subject: [PATCH 2/8] added 2>&1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5cf9696..8db1ade 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ env: - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit script: - - $TEST_CMD | python annotate.py --tool python --tee --name "$FRAMEWORK log" + - $TEST_CMD 2>&1 | python annotate.py --tool python --tee --name "$FRAMEWORK log" after_script: - curl -s https://raw.githubusercontent.com/report-ci/scripts/master/upload.py | python - $SCRIPT_OPT \ No newline at end of file From b26d1abc361cc25f3e9cb6308c03e1aad4ed3e4c Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 03:56:58 +0800 Subject: [PATCH 3/8] workaround for pytest --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8db1ade..82b56a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ install: - set -o pipefail env: - - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest + - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest SED="| sed 's/^E //m'|" - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit script: From 13e325387baf8c332c5c572e86fe7d0d462f2e1a Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 03:59:41 +0800 Subject: [PATCH 4/8] added $SED to actually use the workaround --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82b56a2..7603920 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ env: - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit script: - - $TEST_CMD 2>&1 | python annotate.py --tool python --tee --name "$FRAMEWORK log" + - $TEST_CMD 2>&1 $SED | python annotate.py --tool python --tee --name "$FRAMEWORK log" after_script: - curl -s https://raw.githubusercontent.com/report-ci/scripts/master/upload.py | python - $SCRIPT_OPT \ No newline at end of file From f81c8e48129bedbbda81ada601afa0b18c904835 Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 04:06:37 +0800 Subject: [PATCH 5/8] typo fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7603920..47bd055 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ install: - set -o pipefail env: - - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest SED="| sed 's/^E //m'|" + - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest SED="| sed 's/^E //m'" - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit script: From 5604cedf9e285cdccdb55cb8e7dc2559153fabe9 Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 04:12:48 +0800 Subject: [PATCH 6/8] still trying to make CAT work --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 47bd055..ae0345f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,11 @@ install: - set -o pipefail env: - - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest SED="| sed 's/^E //m'" - - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit + - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest PIPE="sed 's/^E //m'" + - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit PIPE=cat script: - - $TEST_CMD 2>&1 $SED | python annotate.py --tool python --tee --name "$FRAMEWORK log" + - $TEST_CMD 2>&1 | $PIPE | python annotate.py --tool python --tee --name "$FRAMEWORK log" after_script: - curl -s https://raw.githubusercontent.com/report-ci/scripts/master/upload.py | python - $SCRIPT_OPT \ No newline at end of file From 40ac27f26d15f7d984965e8924a7af7ddf0b103b Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 04:20:18 +0800 Subject: [PATCH 7/8] trying sed explicitly --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ae0345f..96b044d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,11 @@ install: - set -o pipefail env: - - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest PIPE="sed 's/^E //m'" - - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit PIPE=cat + - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest SED="'s/^E //m'" + - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit SED="''" script: - - $TEST_CMD 2>&1 | $PIPE | python annotate.py --tool python --tee --name "$FRAMEWORK log" + - $TEST_CMD 2>&1 | set $SED | python annotate.py --tool python --tee --name "$FRAMEWORK log" after_script: - curl -s https://raw.githubusercontent.com/report-ci/scripts/master/upload.py | python - $SCRIPT_OPT \ No newline at end of file From 1621301cd7e3c8653513f1f978e473e88575a72b Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 27 Mar 2019 04:24:56 +0800 Subject: [PATCH 8/8] remove sed nonsense --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96b044d..8db1ade 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,11 @@ install: - set -o pipefail env: - - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest SED="'s/^E //m'" - - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit SED="''" + - TEST_CMD="pytest pytest_example.py --junit-xml=pytest_example.xml" FRAMEWORK=PyTest + - TEST_CMD="python pyunit.py" SCRIPT_OPT="--framework=pyunit" FRAMEWORK=PyUnit script: - - $TEST_CMD 2>&1 | set $SED | python annotate.py --tool python --tee --name "$FRAMEWORK log" + - $TEST_CMD 2>&1 | python annotate.py --tool python --tee --name "$FRAMEWORK log" after_script: - curl -s https://raw.githubusercontent.com/report-ci/scripts/master/upload.py | python - $SCRIPT_OPT \ No newline at end of file