Commit Graph

51 Commits

Author SHA1 Message Date
joey0320 f6d05cc554 AMI update 2023-05-17 14:35:03 -07:00
abejgonzalez f6fc4ccfec Intermediate changes [ci skip] 2023-05-04 23:35:56 -07:00
Sagar Karandikar 5f152c2c73 manager support for custom TARGET_PROJECTs (fasedtests, etc.) up to/including firesim infrasetup and buildbitstream 2023-04-27 21:11:31 +00:00
Sagar Karandikar 018f4df851 partially fix pytests 2023-04-21 18:44:20 +00:00
Benjamin Morse a63571066f
Add URI support to tarball path and xclbin path (#1432)
* driver_tar and xclbin keys can now be a URI
* non URI paths are also supported, with relative paths being relative to the deploy folder
* adds documentation about URI support
* URI are tried 4 times with a 1 second delay after failure
* run-basic-linux-poweroff CI job is now serialized behind run-parallel-verilator-metasims to improve CI reliability

Co-authored-by: Filip Stamenkovic <92741622+filipstamenkovic-sifive@users.noreply.github.com>
Co-authored-by: Abraham Gonzalez <abe.j.gonza@gmail.com>
Co-authored-by: Tim Snyder <timothy.snyder@sifive.com>
2023-03-01 23:04:48 -08:00
David Biancolin 98fa2f9b25
Remove references to buildafi; replace with buildbitstream (#1287) 2022-12-11 03:40:59 +00:00
Russell Horvath 6c26096dbc fix breaking pytests 2022-10-06 22:43:29 +00:00
Sagar Karandikar 9dd5f1b75e Merge remote-tracking branch 'origin/stable' 2022-08-31 18:44:38 +00:00
Sagar Karandikar 5a9d0ff1ac test updating AMI to 1.12.1 2022-08-30 00:16:41 +00:00
Tim Snyder 8cb2325e7e
Revert "add xclbin URI support (#1140)" (#1173)
This reverts commit a517b1992a.
2022-08-16 23:44:35 +00:00
Tim Snyder a517b1992a
add xclbin URI support (#1140)
use fsspec to enable xclbin's to be one of any URI protocol
supported by the library or an installed add-on

Co-authored-by: Tim Snyder <snyder.tim@gmail.com>
Co-authored-by: Filip Stamenkovic <92741622+filipstamenkovic-sifive@users.noreply.github.com>
Co-authored-by: Abraham Gonzalez <abe.j.gonza@gmail.com>
2022-08-10 16:00:19 -05:00
Tim Snyder 6170f835df
add config_build_recipes.yaml to run_yamls fixture for #1142 (#1143)
Addition of config_build_recipes.yaml use by RuntimeConfig in #1076 broke
the pytests for config checking but somehow, it passed in the PR check.

Co-authored-by: Tim Snyder <snyder.tim@gmail.com>
2022-07-25 14:44:10 -07:00
Tim Snyder eb55afb76e fixup! pytest: pass all config files during test_yaml_api.py 2022-07-25 20:26:35 +00:00
Tim Snyder 2f38699c41 pytest: pass all config files during test_yaml_api.py
so that the tests pass or fail regardless of whether firesim managerinit
has been run
2022-07-25 19:53:18 +00:00
Abraham Gonzalez e0016cd059 Move s3 bucket creation after yaml parsing 2022-06-14 03:52:54 +00:00
Abraham Gonzalez dbf361c799 Merge remote-tracking branch 'origin/main' into what-to-build-v2 2022-06-14 02:55:47 +00:00
Sagar Karandikar 9f51cc129e ci/test fixes 2022-06-12 07:44:10 +00:00
Abraham Gonzalez 9aa3c227da Update to new API | Address PR comments 2022-06-10 16:40:31 +00:00
Abraham Gonzalez 9650e75ea2 New API [ci skip] 2022-06-10 16:40:31 +00:00
Abraham Gonzalez 490d2c8992 Allow argument passing to bit builder 2022-06-10 16:40:31 +00:00
Abraham Gonzalez c622f57feb Switch buildfarm API to be similar to runfarm API 2022-06-08 03:27:13 +00:00
Abraham Gonzalez faaca61ed1 Fix pytest for no FPGA default [ci skip] 2022-06-05 03:06:13 +00:00
Abraham Gonzalez 54973be0a6 Fix PyTest 2022-05-30 19:02:00 +00:00
Abraham Gonzalez 352ecd9b77 Bump sampledb + Pytest 2022-05-02 04:51:32 +00:00
Abraham Gonzalez cf818b2868 Merge remote-tracking branch 'origin/runtools-mypy' into where-to-run 2022-05-01 00:41:23 +00:00
Abraham Gonzalez a917bcf155 Merge remote-tracking branch 'origin/what-to-build' into runtools-mypy 2022-04-30 21:19:10 +00:00
Abraham Gonzalez 3eb1bb6053 Fix typing across codebase 2022-04-30 20:42:06 +00:00
Abraham Gonzalez 09e14cd930 Fix pytest 2022-04-30 20:38:23 +00:00
Abraham Gonzalez ae9d357694 _ instead of - in YAML + Use classname for bfarms + Small renaming 2022-04-14 01:02:42 +00:00
Tim Snyder 6bd99b2b8c Merge remote-tracking branch 'origin/main' into use_conda 2022-04-13 00:22:58 +00:00
abejgonzalez b53422702d Merge remote-tracking branch 'origin/local-fpga' 2022-04-02 22:29:06 -07:00
Tim Snyder 5eed280437 Merge remote-tracking branch 'origin/main' into use_conda 2022-03-31 03:18:05 +00:00
Tim Snyder 68ae92db1e scripts/update_test_amis.py uses code from moto instead of copy 2022-03-22 05:01:38 +00:00
abejgonzalez 1c678c3fbf Add default build farm to build API tests 2022-03-18 18:08:04 +00:00
Sagar Karandikar 70b729ed9d update tests to use pagination 2022-03-17 00:50:00 +00:00
Sagar Karandikar d87cfceb7c remove strict=True on test_scripts.py 2022-03-17 00:39:19 +00:00
Tim Snyder da75c7b61b cleanup and finish yaml unit tests
* switch to using pytest-mock mocker fixture
* create a task_mocker that understands how to mock firesim.TASKS correctly
* write the remaining tests and fix the ones I didn't have correct in initial PR
2022-03-14 00:37:31 +00:00
Tim Snyder 6cbc4fb270 add test to demonstrate moto doesn't care about inst type
Abe was curious whether boto would error if you give it a bogus instance
type when launching an instance.  I added a test that shows what moto will
do.  The boto test might be a good example for how to un-munge the environment
for actually using AWS in unit tests that don't mock it out.
2022-03-14 00:37:31 +00:00
Tim Snyder 4e4a48e54a firesim tasks throw if not called via TASKS
When patching for testing, I was concerned about where to do the patching
and making the symbol table lookups throw seemed like a sensible thing.  However,
now that I'm done writing the tests, this seems like it might be overkill
and that's why I'm leaving it in a separate commit in case I want to revert it.
2022-03-14 00:37:28 +00:00
Tim Snyder 44ac18b440 revisit firesim.register_task with PR feedback
* make it a decorator because that's what it really is
* unify BUILD and RUN tasks by introspecting the config class needed at registration time
* unify special cases by allowing tasks to not take a config class and tweaking terminaterunfarm
  so that it only takes the RuntimeConfig (stuffed the args into it like we do with BuildConfigFile)
2022-03-14 00:36:54 +00:00
Tim Snyder 9988093bf1 start rewriting test_yaml_api
There are some tests that depend on setup done earlier in the GH workflow (i.e. managerinit being run)
Others that are unclear as to whether they are supposed to fail before buildafi has been run.
Haven't written most of the RUN_TASK tests yet.
2022-03-11 16:25:12 +00:00
Tim Snyder d4ebf87531 rework toplevel manager script to be importable for testing
* don't use globals() to dispatch the tasks, create a module-level dict for that purpose
* pytest toplevel conftest.py will drop a firesim.py -> firesim symlink for test importing
* construct_argument_parser() should return the parser without actually
  parsing so that the testharness can use it with arglists
2022-03-11 16:20:24 +00:00
Tim Snyder 9630898cf1 start with moving yaml api tests into deploy/tests and unhooking from CI
it will get run by pytest
2022-03-09 20:48:33 +00:00
Tim Snyder 3aba45913e update test_amis.json after #977 failed to 2022-03-05 01:44:14 +00:00
Tim Snyder caab42aa9c
Add scripts/update_test_amis.py for maintaining deploy/tests/test_amis.json (#947)
* mv deploy/tests/test_amis{_snake,}.json

_snake is related to the janky way I manually created MOTO_AMIS_PATH the first time
I'm replacing that with a customized version of the moto/scripts/get_amis.py script

* add scripts/update_test_amis.py as copied from moto

just so that the diff is inspectable later...

* Customize scripts/update_test_amis.py for FireSim

And use it to update deploy/tests/test_amis.json
And add a test to check whether test_amis.json needs to be updated
And make all of the tests that will fail confusingly depend on that test

* add comment about running script when you update the AMI

Co-authored-by: Tim Snyder <snyder.tim@gmail.com>
2022-02-18 23:03:32 +00:00
Tim Snyder 9acf77769d rename 'expand_runfarm_by_count' to 'always_expand' and plumb to config_runtime.ini 2022-02-15 20:09:49 +00:00
Tim Snyder 6f59f47d30 rename 'additive' parameter of launch_instances to 'expand_runfarm_by_count' 2022-02-15 16:27:09 +00:00
Tim Snyder 127ad30488 Apply feedback from PR
* make default timeout 0 to match legacy behavior when new
  key is not present in runtime.ini
* Add tests requires
   * moving scripts/aws-setup.py into a loadable module
   * adding sure to machine-launch-script.sh for nicer assertion style
* Generalize awstools.get_instances_by_tag_type to not assume it is
  being called with 'fsimcluster' value, uses tags dict.  Created
  awstools.get_run_instances_by_tag_type that uses old symantics and calls
  the general function similar to launch_run_instances()
* Add `additive` parameter to `awstools.launch_instances()` that controls
  whether `count` is the number to be launched in that call or a total number
  of instances that should be reached including ones already launched that
  match the `type` and `tags`
2022-02-14 22:27:34 +00:00
Tim Snyder fd2041bf41 Add FPGA dev AMI to moto via MOTO_AMIS_PATH env var 2022-02-14 17:22:51 +00:00
Abraham Gonzalez 0ed1e42df8
Port to Python3 + Switch to GH-A CI (#878)
* First pass at porting to python3

* Fix import errors | Setup user argcomplete

* Update awstools CLI with user data file | Bump CI to use it

* Wait until launch is complete

* Add userdata as string | Use sudo for machine-launch-script

* Remove execute permissions on machine-launch-script

* Better match on machine-launch-script complete

* Revert python-devel removal

* Use python3 for pytests

* Update more python3 items

* Remove extra shebang

* Port docs to python3 and add to CI

* Add ISCA experiments to CI build check

* Use yum not apt-get

* Add make to doc section

* Bump multilate-loadgen for sysroot fix

* For BW test build don't use shebang

* Fix docs Makefile options

* Fix more doc warnings

* Add first set of regression tests

* Fix raw_input

* Regression bump | Run workload fix

* Add functools to topology

* Fix linux poweroff test (nic still has issues)

* Update regression scripts

* Ignore machine-launch-script.sh in regression area

* Fix map python3 issues

* Get rid of shebangs

* Fix more regressions

* Print machine-launch.log on fail | More clarification on user_data

* Transfer to CI some shorter regressions

* Add a manual approval to fpga based tests

* Fix indentation in config.yml

* Fix test symlink

* Use spot for CI manager instance | Try to use python3 for aws CI container | Version all pip packages

* Make run-ini-api-tests an executable

* Fix CI terminaterunfarm arg

* Add firesim.pem file to manager

* Bump python in CI instance

* Bump pip in CI container

* Remove pip sudo in CI container

* Fix launch script pip version equals

* Ini converted into strings

* Properly pass test_dir to opts in CI

* First pass at GH-A

* Round 2 CI fixes

* Try changes

* Remove CircleCI | Switch to fancy GH-A

* Rename self-host setup script

* Update chmod

* Use - instead of _ for env. vars

* Rename some defs | Remove extra imports

* Small comment updates

* Forgot to import in ini-api tests | Small comment on Fabric timeouts

* Add sys to linux poweroff

* Update linux timeout, fix small imports

* Update comment

* Fix-up workflow-monitor.py

* Avoid excessive logging in run-linux | Terminate spot instances after max-runtime

* Add more workflow-monitor states | Add pty=False to running workloads

* Update CI documentation | Add CI badge [ci skip]

* Don't use spot instances

* Update CI readme

* Determine runner version from remote repo and check for runner setup

* Address PR comments

* Update CI_README location of where to find IPs | Forgot ret_code

* Only run CI on prs/pushes to dev/main/master

* Fix terminate_workflow_instances in init-manager.py

* Cleanup FireSim repo cloning | Only run CI on PRs (since its runs on merge commit)
2022-01-20 11:03:37 -08:00