git @ Cat's Eye Technologies SixtyPical / master
Merge pull request #23 from catseye/develop-2023-1 Develop 2023 1 Chris Pressey authored 6 months ago GitHub committed 6 months ago
7 changed file(s) with 50 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
+0
-27
.circleci/config.yml less more
0 # Python CircleCI 2.0 configuration file
1 #
2 # Check https://circleci.com/docs/2.0/language-python/ for more details
3 #
4 version: 2
5 jobs:
6 build:
7 docker:
8 - image: circleci/python:3.6.1
9
10 working_directory: ~/SixtyPical
11
12 steps:
13 - checkout
14
15 - run:
16 name: install dependencies
17 command: |
18 echo "hi"
19 git clone https://github.com/catseye/Falderal
20 git clone https://github.com/catseye/dcc6502
21 (cd dcc6502 && make)
22
23 - run:
24 name: run tests
25 command: |
26 PATH=dcc6502:Falderal/bin:$PATH ./test.sh
00 *.pyc
1 __pycache__
12 vicerc
00 History of SixtyPical
11 =====================
2
3 0.21-2023.0309
4 --------------
5
6 * Python 3 is the default interpreter for `sixtypical`.
7 * Test appliance added for testing under Python 2.7.
8 * `dcc6502` test adapter made runnable under both
9 Python 2 and Python 3.
210
311 0.21
412 ----
0 #!/usr/bin/env python
0 #!/usr/bin/env python3
11
22 from os.path import realpath, dirname, join
33 import sys
11
22 # This currently represents a lot of tests! If you only want to run a subset,
33 # it's probably best to run `falderal` manually on the file(s) you want to test.
4 # Note also that the `sixtypical-py2.7.md` appliance, in the same directory as
5 # `sixtypical.md`, can be used to run the tests under Python 2.7.
46
57 falderal --substring-error \
68 "tests/appliances/sixtypical.md" \
0 #!/usr/bin/env python2
0 #!/usr/bin/env python3
11
22 # script that allows the binary output of sixtypical --output-format=c64-basic-prg --compile to be
33 # disassembled by https://github.com/tcarmelveilleux/dcc6502
77 from subprocess import check_output
88 from tempfile import NamedTemporaryFile
99
10 bytes = sys.stdin.read()
10 try:
11 bytes = sys.stdin.buffer.read()
12 except AttributeError:
13 bytes = sys.stdin.read()
1114
1215 bytes = bytes[14:]
1316
1619 f.write(bytes)
1720 f.close()
1821
19 lines = [line for line in check_output("dcc6502 -o 2061 {}".format(filename), shell=True).split('\n') if line and not line.startswith(';')]
22 output = check_output("dcc6502 -o 2061 {}".format(filename), shell=True)
23 output_lines = output.decode('utf-8').split('\n')
24 lines = [line for line in output_lines if line and not line.startswith(';')]
2025 lines = [re.sub(r'\s*\;.*$', '', line) for line in lines]
2126 sys.stdout.write('\n'.join(lines))
0 This file contains only the [Falderal][] directives that define the different
1 functionalities tested by the test suite, assuming that it's the reference
2 implementation, `sixtypical`, that is going to implement these functionalities,
3 and additionally that `sixtypical` is running under Python 2.7.
4
5 NOTE that this is not well-supported anymore, given that Python 2.7 is past
6 end-of-life.
7
8 [Falderal]: http://catseye.tc/node/Falderal
9
10 -> Functionality "Check syntax of SixtyPical program" is implemented by
11 -> shell command "python2.7 bin/sixtypical --parse-only --traceback %(test-body-file) && echo ok"
12
13 -> Functionality "Analyze SixtyPical program" is implemented by
14 -> shell command "python2.7 bin/sixtypical --analyze-only --traceback %(test-body-file) && echo ok"
15
16 -> Functionality "Compile SixtyPical program" is implemented by
17 -> shell command "python2.7 bin/sixtypical --output-format=c64-basic-prg --traceback %(test-body-file) --output /tmp/foo && python2.7 tests/appliances/bin/dcc6502-adapter </tmp/foo"
18
19 -> Functionality "Dump callgraph info for SixtyPical program" is implemented by
20 -> shell command "python2.7 bin/sixtypical --dump-callgraph --analyze-only --traceback %(test-body-file)"
21
22 -> Functionality "Compile SixtyPical program with unreachable routine removal" is implemented by
23 -> shell command "python2.7 bin/sixtypical --output-format=c64-basic-prg --prune-unreachable-routines --traceback %(test-body-file) --output /tmp/foo && python2.7 tests/appliances/bin/dcc6502-adapter </tmp/foo"
24
25 -> Functionality "Dump fallthru info for SixtyPical program" is implemented by
26 -> shell command "python2.7 bin/sixtypical --optimize-fallthru --dump-fallthru-info --analyze-only --traceback %(test-body-file)"
27
28 -> Functionality "Compile SixtyPical program with fallthru optimization" is implemented by
29 -> shell command "python2.7 bin/sixtypical --output-format=c64-basic-prg --optimize-fallthru --traceback %(test-body-file) --output /tmp/foo && python2.7 tests/appliances/bin/dcc6502-adapter </tmp/foo"