Skip to content

Commit

Permalink
Merge pull request #3 from AntelopeIO/remove_eosio_references
Browse files Browse the repository at this point in the history
Remove EOSIO references, change eosio-cpp and eosio-ld to cdt-cpp and cdt-ld
  • Loading branch information
linh2931 authored Aug 15, 2022
2 parents 925af94 + 01e2eb4 commit 112c682
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 199 deletions.
148 changes: 0 additions & 148 deletions CONTRIBUTING.md

This file was deleted.

27 changes: 0 additions & 27 deletions IMPORTANT.md

This file was deleted.

23 changes: 5 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EOSIO WASM Spec Tests
# WASM Spec Tests

This repo provides a set of EOSIO unit tests that can be used to check a WASM Backend's conformance to the
This repo provides a set of unit tests that can be used to check a WASM Backend's conformance to the
WebAssembly spec.

## Tests
Expand All @@ -18,7 +18,7 @@ WebAssembly spec.
- The imports and apply functions (and any helper functions) from the generated wasm are combined with the test function definitions from the spec test wasm.
- Any necessary shifting of type/import/function/call/exports numbers is done.
- This is where the generated map from above is used.
6. The newly created merged wasms and unit test C++ files are copied into the appropriate directory in the eos repo.
6. The newly created merged wasms and unit test C++ files are copied into the appropriate directory in the Leap repo.


### How tests are split up
Expand All @@ -43,7 +43,7 @@ WebAssembly spec.
- Unclear how to hand alter this to have memory properly zeroed where expected.

- start.7 -- Will fail if not deleted from generated tests.
- Imports "print" from "spectest". Changing to any of the EOSIO print functions results in "start function must be nullary" due to their requiring a parameter.
- Imports "print" from "spectest". Changing to any of the `eosio::print` functions results in "start function must be nullary" due to their requiring a parameter.

- globals.2 -- Delete from generated tests or it segfaults due to missing wasm.
- `eosio-wasm2wast` error "mutable globals cannot be exported" when converting to wast.
Expand All @@ -53,21 +53,8 @@ WebAssembly spec.
- `wasm2wat` provided by WABT handles this correctly, implying an error in CDT.
- globals.14 -- Delete from generated tests or it segfaults due to missing wasm.
- Imports "global_i32" from "spectest".
- Unclear what an appropriate substition from EOSIO would be.


## Contributing

[Contributing Guide](./CONTRIBUTING.md)

[Code of Conduct](./CONTRIBUTING.md#conduct)
- Unclear what an appropriate substition would be.

## License

[MIT](./LICENSE)

## Important

See [LICENSE](./LICENSE) for copyright and license terms.

All repositories and other materials are provided subject to the terms of this [IMPORTANT](./IMPORTANT.md) notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements. By accessing any of our repositories and other materials, you accept and agree to the terms of the notice.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ def main(root, in_file, out_file):

intermediate_file = 'intermediate.wasm'
res = subprocess.run(
['eosio-cpp', '-O0', '-c', in_file, '-o', intermediate_file],
['cdt-cpp', '-O0', '-c', in_file, '-o', intermediate_file],
capture_output=True
)
if res.returncode > 0:
print(res.args)
raise CompileError(res.stderr)

res = subprocess.run(
['eosio-ld', intermediate_file, '-o', out_file],
['cdt-ld', intermediate_file, '-o', out_file],
capture_output=True
)
if res.returncode > 0:
Expand Down
2 changes: 1 addition & 1 deletion generator/generate_eosio_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from regexes import DATA_REGEX, EXPORT_REGEX, FUNC_REGEX
from test_wasm import TestWASM

from compile_eosio_tests import CompileError
from compile_tests import CompileError

def main(generated_wasm_file, test_wasm_file, out_wasm_file, map_file):
def read_wasm_file(wasm_file):
Expand Down
6 changes: 3 additions & 3 deletions generator/setup_eosio_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import sys
import tempfile

from compile_eosio_tests import CompileError
from compile_tests import CompileError

import compile_eosio_tests
import compile_tests
import generate_eosio_tests

WASM_DIR = ''
Expand Down Expand Up @@ -117,7 +117,7 @@ def compile_wasm():

def compile_eosio(f):
d, name = f
compile_eosio_tests.main(
compile_tests.main(
d,
f'{name}.{d}.wasm.cpp',
f'{name}.{d}-int.wasm',
Expand Down

0 comments on commit 112c682

Please sign in to comment.