diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 3d3840beb..d1567df83 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -13,7 +13,7 @@ concurrency: jobs: - # First list all the files in experiments/tests, and generate a JSON string of all the files + # First list all the files in tests/ci, and generate a JSON string of all the files collect-experiments: runs-on: ubuntu-latest outputs: @@ -23,12 +23,12 @@ jobs: - uses: actions/checkout@v3 - id: set-matrix run: | - echo "matrix=$(ls experiments/tests/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT + echo "matrix=$(ls tests/ci/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT # - id: set-matrix-wip - # run: echo "matrix-wip=$(ls experiments/wip/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT + # run: echo "matrix-wip=$(ls tests/wip/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT # Build a matrix run of all experiments generated in previous job - run-experiments: + run-test: needs: collect-experiments runs-on: [self-hosted, linux] strategy: diff --git a/.github/workflows/weeklytests.yml b/.github/workflows/weeklytests.yml index 9a0b91fe0..bd5e56c63 100644 --- a/.github/workflows/weeklytests.yml +++ b/.github/workflows/weeklytests.yml @@ -23,7 +23,7 @@ jobs: submodules: 'recursive' - id: set-matrix run: | - echo "matrix=$(ls experiments/weekly_tests/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT + echo "matrix=$(ls tests/weekly_tests/*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT run-tests: needs: collect-tests diff --git a/.vscode/launch.json b/.vscode/launch.json index c0a68bba8..d068d1535 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -84,7 +84,7 @@ "python": "${workspaceFolder}/.venv/bin/python", "program": "scripts/run_experiment.py", "args": [ - "experiments/phys_netlist.yaml", + "tests/phys_netlist.yaml", "-j1" ], "env": { diff --git a/bfasst/paths.py b/bfasst/paths.py index f3e0d2eb5..fb5d6490f 100644 --- a/bfasst/paths.py +++ b/bfasst/paths.py @@ -9,7 +9,7 @@ DESIGNS_PATH = ROOT_PATH / "designs" BFASST_PATH = ROOT_PATH / "bfasst" -EXPERIMENTS_PATH = ROOT_PATH / "experiments" +TESTS_PATH = ROOT_PATH / "tests" RESOURCES_PATH = ROOT_PATH / "resources" SCRIPTS_PATH = ROOT_PATH / "scripts" ERROR_FLOW_PATH = ROOT_PATH / "error_flows" diff --git a/html_table_README.md b/html_table_README.md index 2893224ef..62acdb452 100644 --- a/html_table_README.md +++ b/html_table_README.md @@ -8,7 +8,7 @@ To run an experiment of flows and update the table, source the following two bas `run_flows.sh` -* If you want to create a new custom flow for testing, ensure the proper code is located in `scripts/bfasst/flows.py` along with an associated `.yaml` file in the `experiments` directory. +* If you want to create a new custom flow for testing, ensure the proper code is located in `scripts/bfasst/flows.py` along with an associated `.yaml` file in the `tests` directory. * Add your new flow to the `flows_list` variable within the main function of `scripts/run_experiment.py` (this will add a new column to the table). * Modify the script to add the commands for running the new experiment in `run_flows.sh` before sourcing. diff --git a/scripts/run_design.py b/scripts/run_design.py index 50b16e421..7c1bc6cf9 100755 --- a/scripts/run_design.py +++ b/scripts/run_design.py @@ -79,7 +79,7 @@ def main(): error_flows = [] for dir_item in paths.ERROR_FLOW_PATH.iterdir(): - if (paths.EXPERIMENTS_PATH / dir_item).is_file() and dir_item.suffix == ".yaml": + if (paths.TESTS_PATH / dir_item).is_file() and dir_item.suffix == ".yaml": error_flows.append(dir_item.stem) parser.add_argument( "--error_flow", diff --git a/test/scripts/test_run.py b/test/scripts/test_run.py index a89002e0d..e60e89d84 100644 --- a/test/scripts/test_run.py +++ b/test/scripts/test_run.py @@ -4,7 +4,7 @@ import unittest import io from contextlib import redirect_stderr -from bfasst.paths import EXPERIMENTS_PATH, ROOT_PATH +from bfasst.paths import TESTS_PATH, ROOT_PATH from scripts.run import parse_args @@ -63,7 +63,7 @@ def __try_check_args_for_success(self, args): def test_check_args_succeeds_on_yaml(self): """Test that the check_args function accepts only a yaml or a design/flow""" - args = [EXPERIMENTS_PATH / "tests/vivado_bit_analysis.yaml"] + args = [TESTS_PATH / "ci/vivado_bit_analysis.yaml"] self.__try_check_args_for_success(args) def test_check_args_succeeds_on_flow_and_design(self): @@ -82,7 +82,7 @@ def __produce_check_args_failure(self, args): parse_args(args) def test_check_args_fails_on_yaml_and_design_and_flow(self): - args = ["--yaml", "experiments/tests/test.yaml", "--design", "byu/alu", "--flow", "vivado"] + args = ["--yaml", "tests/ci/test.yaml", "--design", "byu/alu", "--flow", "vivado"] self.__produce_check_args_failure(args) def test_check_args_fails_on_no_args(self): @@ -90,9 +90,9 @@ def test_check_args_fails_on_no_args(self): self.__produce_check_args_failure(args) def test_check_args_fails_on_yaml_and_design(self): - args = ["--yaml", "experiments/tests/test.yaml", "--design", "byu/alu"] + args = ["--yaml", "tests/ci/test.yaml", "--design", "byu/alu"] self.__produce_check_args_failure(args) def test_check_args_fails_on_yaml_and_flow(self): - args = ["--yaml", "experiments/tests/test.yaml", "--flow", "vivado"] + args = ["--yaml", "tests/ci/test.yaml", "--flow", "vivado"] self.__produce_check_args_failure(args) diff --git a/experiments/.gitignore b/tests/.gitignore similarity index 100% rename from experiments/.gitignore rename to tests/.gitignore diff --git a/experiments/Makefile.common b/tests/Makefile.common similarity index 96% rename from experiments/Makefile.common rename to tests/Makefile.common index c5feacaeb..18eb42e56 100644 --- a/experiments/Makefile.common +++ b/tests/Makefile.common @@ -2,7 +2,7 @@ BFASST_PATH := $(realpath $(LEVEL)/..) RESOURCES = $(BFASST_PATH)/resources SCRIPTS = $(BFASST_PATH)/scripts -EXPERIMENTS = $(BFASST_PATH)/experiments +TESTS = $(BFASST_PATH)/tests EXAMPLES = $(BFASST_PATH)/examples include $(RESOURCES)/Makefile_colors.inc diff --git a/experiments/Makefile.utils b/tests/Makefile.utils similarity index 100% rename from experiments/Makefile.utils rename to tests/Makefile.utils diff --git a/experiments/basic_conformal_compare.yaml b/tests/basic_conformal_compare.yaml similarity index 100% rename from experiments/basic_conformal_compare.yaml rename to tests/basic_conformal_compare.yaml diff --git a/experiments/basic_yosys_compare.yaml b/tests/basic_yosys_compare.yaml similarity index 100% rename from experiments/basic_yosys_compare.yaml rename to tests/basic_yosys_compare.yaml diff --git a/experiments/tests/rand_soc.yaml b/tests/ci/rand_soc.yaml similarity index 100% rename from experiments/tests/rand_soc.yaml rename to tests/ci/rand_soc.yaml diff --git a/experiments/tests/vivado_bit_analysis.yaml b/tests/ci/vivado_bit_analysis.yaml similarity index 100% rename from experiments/tests/vivado_bit_analysis.yaml rename to tests/ci/vivado_bit_analysis.yaml diff --git a/experiments/tests/vivado_conformal.yaml b/tests/ci/vivado_conformal.yaml similarity index 100% rename from experiments/tests/vivado_conformal.yaml rename to tests/ci/vivado_conformal.yaml diff --git a/experiments/tests/vivado_ooc.yaml b/tests/ci/vivado_ooc.yaml similarity index 100% rename from experiments/tests/vivado_ooc.yaml rename to tests/ci/vivado_ooc.yaml diff --git a/experiments/tests/vivado_phys_netlist.yaml b/tests/ci/vivado_phys_netlist.yaml similarity index 100% rename from experiments/tests/vivado_phys_netlist.yaml rename to tests/ci/vivado_phys_netlist.yaml diff --git a/experiments/tests/vivado_phys_netlist_cmp.yaml b/tests/ci/vivado_phys_netlist_cmp.yaml similarity index 100% rename from experiments/tests/vivado_phys_netlist_cmp.yaml rename to tests/ci/vivado_phys_netlist_cmp.yaml diff --git a/experiments/tests/vivado_yosys_impl.yaml b/tests/ci/vivado_yosys_impl.yaml similarity index 100% rename from experiments/tests/vivado_yosys_impl.yaml rename to tests/ci/vivado_yosys_impl.yaml diff --git a/experiments/error_injector.yaml b/tests/error_injector.yaml similarity index 100% rename from experiments/error_injector.yaml rename to tests/error_injector.yaml diff --git a/experiments/gather_impl_data.yaml b/tests/gather_impl_data.yaml similarity index 100% rename from experiments/gather_impl_data.yaml rename to tests/gather_impl_data.yaml diff --git a/experiments/phys_netlist.yaml b/tests/phys_netlist.yaml similarity index 100% rename from experiments/phys_netlist.yaml rename to tests/phys_netlist.yaml diff --git a/experiments/rtl_lse.yaml b/tests/rtl_lse.yaml similarity index 100% rename from experiments/rtl_lse.yaml rename to tests/rtl_lse.yaml diff --git a/experiments/rtl_synplify_ic2_conformal.yaml b/tests/rtl_synplify_ic2_conformal.yaml similarity index 100% rename from experiments/rtl_synplify_ic2_conformal.yaml rename to tests/rtl_synplify_ic2_conformal.yaml diff --git a/experiments/rtl_synplify_ic2_onespin.yaml b/tests/rtl_synplify_ic2_onespin.yaml similarity index 100% rename from experiments/rtl_synplify_ic2_onespin.yaml rename to tests/rtl_synplify_ic2_onespin.yaml diff --git a/experiments/rtl_xilinx_conformal.yaml b/tests/rtl_xilinx_conformal.yaml similarity index 100% rename from experiments/rtl_xilinx_conformal.yaml rename to tests/rtl_xilinx_conformal.yaml diff --git a/experiments/rtl_xilinx_conformal_base.yaml b/tests/rtl_xilinx_conformal_base.yaml similarity index 100% rename from experiments/rtl_xilinx_conformal_base.yaml rename to tests/rtl_xilinx_conformal_base.yaml diff --git a/experiments/rtl_yosys_tech_synplify_ic2_conformal.yaml b/tests/rtl_yosys_tech_synplify_ic2_conformal.yaml similarity index 100% rename from experiments/rtl_yosys_tech_synplify_ic2_conformal.yaml rename to tests/rtl_yosys_tech_synplify_ic2_conformal.yaml diff --git a/experiments/rtl_yosys_tech_synplify_onespin.yaml b/tests/rtl_yosys_tech_synplify_onespin.yaml similarity index 100% rename from experiments/rtl_yosys_tech_synplify_onespin.yaml rename to tests/rtl_yosys_tech_synplify_onespin.yaml diff --git a/experiments/verify_fasm_to_bels.yaml b/tests/verify_fasm_to_bels.yaml similarity index 100% rename from experiments/verify_fasm_to_bels.yaml rename to tests/verify_fasm_to_bels.yaml diff --git a/experiments/verify_fasm_to_bels_yosys.yaml b/tests/verify_fasm_to_bels_yosys.yaml similarity index 100% rename from experiments/verify_fasm_to_bels_yosys.yaml rename to tests/verify_fasm_to_bels_yosys.yaml diff --git a/experiments/vtr_benchmarks.yaml b/tests/vtr_benchmarks.yaml similarity index 100% rename from experiments/vtr_benchmarks.yaml rename to tests/vtr_benchmarks.yaml diff --git a/experiments/wafove.yaml b/tests/wafove.yaml similarity index 100% rename from experiments/wafove.yaml rename to tests/wafove.yaml diff --git a/experiments/weekly_tests/error_injection.yaml b/tests/weekly_tests/error_injection.yaml similarity index 100% rename from experiments/weekly_tests/error_injection.yaml rename to tests/weekly_tests/error_injection.yaml diff --git a/experiments/weekly_tests/phys_netlist_paper.yaml b/tests/weekly_tests/phys_netlist_paper.yaml similarity index 100% rename from experiments/weekly_tests/phys_netlist_paper.yaml rename to tests/weekly_tests/phys_netlist_paper.yaml diff --git a/experiments/weekly_tests/vivado.yaml b/tests/weekly_tests/vivado.yaml similarity index 100% rename from experiments/weekly_tests/vivado.yaml rename to tests/weekly_tests/vivado.yaml diff --git a/experiments/weekly_tests/vivado_full_ooc.yaml b/tests/weekly_tests/vivado_full_ooc.yaml similarity index 100% rename from experiments/weekly_tests/vivado_full_ooc.yaml rename to tests/weekly_tests/vivado_full_ooc.yaml diff --git a/experiments/weekly_tests/vivado_ooc.yaml b/tests/weekly_tests/vivado_ooc.yaml similarity index 100% rename from experiments/weekly_tests/vivado_ooc.yaml rename to tests/weekly_tests/vivado_ooc.yaml diff --git a/experiments/xilinx_and_reversed.yaml b/tests/xilinx_and_reversed.yaml similarity index 100% rename from experiments/xilinx_and_reversed.yaml rename to tests/xilinx_and_reversed.yaml diff --git a/experiments/xilinx_ooc.yaml b/tests/xilinx_ooc.yaml similarity index 100% rename from experiments/xilinx_ooc.yaml rename to tests/xilinx_ooc.yaml diff --git a/experiments/xilinx_phys_netlist_cmp.yaml b/tests/xilinx_phys_netlist_cmp.yaml similarity index 100% rename from experiments/xilinx_phys_netlist_cmp.yaml rename to tests/xilinx_phys_netlist_cmp.yaml diff --git a/experiments/yosys_synplify_error_onespin.yaml b/tests/yosys_synplify_error_onespin.yaml similarity index 100% rename from experiments/yosys_synplify_error_onespin.yaml rename to tests/yosys_synplify_error_onespin.yaml diff --git a/experiments/yosys_tech_lse.yaml b/tests/yosys_tech_lse.yaml similarity index 100% rename from experiments/yosys_tech_lse.yaml rename to tests/yosys_tech_lse.yaml