diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 030271f..a2d2412 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -231,6 +231,14 @@ jobs: run: | pytest -s tests/tests.py + - name: Run build test (x86) + run: | + shellcodetester -asm tests/test_x86.asm + + - name: Run build test (x86_64) + run: | + shellcodetester -asm tests/test_x86_64.asm + publish: name: Publish on Test Environment needs: test diff --git a/tests/tests.py b/tests/tests.py index 235852c..5d17dab 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -3,61 +3,5 @@ import pytest, sys -from shell_libs.color import Color -from ..shellcodetester import shellcodetester - - def test_step_001(): - Color.pl('\n\n{+} Compiling x86...{W}') - - sys.argv = ['shellcodetester', '-asm', 'test_x86.asm'] - if sys.stdout.encoding is None: - # Output is redirected to a file - sys.stdout = codecs.getwriter('latin-1')(sys.stdout) - - try: - - shellcodetester.run() - - assert True - except Exception as e: - Color.pl('\n{!} {R}Error:{O} %s{W}' % str(e)) - - Color.pl('\n{!} {O}Full stack trace below') - from traceback import format_exc - Color.p('\n{!} ') - err = format_exc().strip() - err = err.replace('\n', '\n{W}{!} {W} ') - err = err.replace(' File', '{W}{D}File') - err = err.replace(' Exception: ', '{R}Exception: {O}') - Color.pl(err) - - assert False - - -def test_step_002(): - Color.pl('\n\n{+} Compiling x86_64...{W}') - - sys.argv = ['shellcodetester', '-asm', 'test_x86_64.asm'] - if sys.stdout.encoding is None: - # Output is redirected to a file - sys.stdout = codecs.getwriter('latin-1')(sys.stdout) - - try: - - shellcodetester.run() - - assert True - except Exception as e: - Color.pl('\n{!} {R}Error:{O} %s{W}' % str(e)) - - Color.pl('\n{!} {O}Full stack trace below') - from traceback import format_exc - Color.p('\n{!} ') - err = format_exc().strip() - err = err.replace('\n', '\n{W}{!} {W} ') - err = err.replace(' File', '{W}{D}File') - err = err.replace(' Exception: ', '{R}Exception: {O}') - Color.pl(err) - - assert False + pass \ No newline at end of file