{"id":18716661,"url":"https://github.com/immunant/c2rust-testsuite","last_synced_at":"2025-11-10T11:30:15.166Z","repository":{"id":110397751,"uuid":"182341121","full_name":"immunant/c2rust-testsuite","owner":"immunant","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-12T02:42:45.000Z","size":111,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-28T10:33:03.515Z","etag":null,"topics":["c2rust","integration-testing","test-automation"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/immunant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-20T00:31:02.000Z","updated_at":"2022-06-25T23:57:45.000Z","dependencies_parsed_at":"2023-04-23T13:33:05.915Z","dependency_job_id":null,"html_url":"https://github.com/immunant/c2rust-testsuite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunant%2Fc2rust-testsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunant%2Fc2rust-testsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunant%2Fc2rust-testsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immunant%2Fc2rust-testsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/immunant","download_url":"https://codeload.github.com/immunant/c2rust-testsuite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239581801,"owners_count":19662958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c2rust","integration-testing","test-automation"],"created_at":"2024-11-07T13:13:21.465Z","updated_at":"2025-11-10T11:30:15.129Z","avatar_url":"https://github.com/immunant.png","language":"Python","readme":"# C2Rust testsuite\n\n## Prerequisites\n\n- `c2rust` binary in path\n- python 3.6 or later.\n- `intercept-build` in path. installing:\n    - `pip3 install -r requirements.txt`\n- any other packages and binaries required by the tests themselves\n    - captured in `**/requirements.yml`\n\n## Command line interface\n\n    $ ./test.py                       # test everything\n    $ ./test.py --verbose             # show test output\n    $ ./test.py lua                   # run specific project\n    $ ./test.py lua --stage transpile # run specific stage of project\n    \n\n## Adding new tests as git submodules\n\n    $ cd path/to/tests/$PROJ\n    $ git submodule add --depth 10  $PROJ_URL repo\n    \nTo track a specific branch ($SUBMOD_NAME can be found in `.gitmodules`):    \n    \n    $ git config -f .gitmodules submodule.$SUBMOD_NAME.branch $BRANCH_NAME\n    $ git submodule update --remote repo\n\n## Adding test steps\n\nEach test stage can be controlled with a script (in `tests/$PROJ`) named as follows:\n\n- autogen stage -\u003e `autogen.sh`\n- configure stage -\u003e `configure.sh`\n- make stage -\u003e  `make.sh` | `cmake.sh`\n- transpile stage -\u003e  `transpile.sh` | `transpile.gen.sh` | `cmake.sh`\n- cargo build stage -\u003e `cargo.sh` | `cargo.gen.sh`\n- test stage -\u003e `check.sh` | `test.sh`\n\n**note** the `.gen.sh` suffix are used to mark scripts generated automatically. Generation is requested via `conf.yml` like this:\n\n```yaml\ntranspile:\n  autogen: true\ncargo:\n  autogen: true\n```\n\nUnlike hand-written scripts, autogenerated ones are not version controlled.\n\nEach script is expected to `tee` its output to a file named `$SCRIPT.log`. For example, `make.sh` produces `make.sh.log`.\n\n# Controlling test steps via environment variables\n\nUse the following optional variables to control test steps:\n\n- `EXTRA_CFLAGS` passes extra flags to the compiler when transpiling\n- `EXTRA_TFLAGS` passes extra flags to the transpiler itself\n- `TOOLCHAIN` controls which toolchain `cargo build`s the transpiled code (must\n  start with a + character)\n- `C2RUST_DIR` is the path to a local checkout of the c2rust sources. Runtime\n  support crates from this checkout will be used instead of pulling them from\n  crates.io.\n\n# TODOs\n- [ ] check requirements on macOS\n  - allow cargo build and transpile steps w/o scripts\n- [ ] warn if `compile_commands.json` is empty\n- [ ] add provision.py driven by `**/conf.yml`\n- [ ] add option to run `c2rust transpile` under `rust-gdb`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmunant%2Fc2rust-testsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimmunant%2Fc2rust-testsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmunant%2Fc2rust-testsuite/lists"}