Skip to content

Commit

Permalink
Remove files that shouldn't be in testdata
Browse files Browse the repository at this point in the history
And change default output of program to stop creating them there.
  • Loading branch information
jblebrun committed Oct 17, 2020
1 parent e9e8920 commit a3c70b0
Show file tree
Hide file tree
Showing 16 changed files with 10 additions and 107 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Expand Up @@ -22,5 +22,8 @@ jobs:
- name: Run Tests
run: make test

- name: Run main program
run: python3 -m octopy test/testdata/fibble.8o

- name: Run Executable
run: ./scripts/testprogram.sh
9 changes: 7 additions & 2 deletions octopy/__main__.py
@@ -1,3 +1,4 @@
import os
import sys

from octopy.assemble import assemble
Expand All @@ -9,19 +10,23 @@

f = open(sys.argv[1])

path, filename = os.path.split(sys.argv[1])
basename, ext = os.path.splitext(filename)


program = assemble(f)

if len(sys.argv) > 2:
outname = sys.argv[2]
else:
outname = sys.argv[1].split(".")[0] + ".ch8"
outname = basename + ".ch8"
fout = open(outname, 'w')
fout.buffer.write(program.program)

if len(sys.argv) > 3:
outname = sys.argv[3]
else:
outname = sys.argv[1].split(".")[0] + ".sym"
outname = basename + ".sym"

fout = open(outname, 'w')
for name, pc in program.labels.items():
Expand Down
Binary file removed test/testdata/begin.ch8
Binary file not shown.
19 changes: 0 additions & 19 deletions test/testdata/begin.sym

This file was deleted.

Binary file removed test/testdata/calls.ch8
Binary file not shown.
22 changes: 0 additions & 22 deletions test/testdata/calls.sym

This file was deleted.

Binary file removed test/testdata/etc.ch8
Binary file not shown.
19 changes: 0 additions & 19 deletions test/testdata/etc.sym

This file was deleted.

Binary file removed test/testdata/loop.8o.ch8
Binary file not shown.
1 change: 0 additions & 1 deletion test/testdata/macro.8o.ch8

This file was deleted.

1 change: 0 additions & 1 deletion test/testdata/macro.ch8

This file was deleted.

20 changes: 0 additions & 20 deletions test/testdata/macro.sym

This file was deleted.

Binary file removed test/testdata/octoballs.8o.ch8
Binary file not shown.
Binary file removed test/testdata/sinusoid.8o.ch8
Binary file not shown.
Binary file removed test/testdata/unpack.ch8
Binary file not shown.
23 changes: 0 additions & 23 deletions test/testdata/unpack.sym

This file was deleted.

0 comments on commit a3c70b0

Please sign in to comment.