Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add another type of tests: testing that WLA's/WLALINK's verbose mode's output contains a string #485

Open
vhelin opened this issue Feb 25, 2022 · 6 comments

Comments

@vhelin
Copy link
Owner

vhelin commented Feb 25, 2022

This is something we'd need in "tests/z80/ram_sections_2".

Currently the output is:

-------------------------------------------------
---                   ROM                     ---
-------------------------------------------------
ROM bank 0 (16384 bytes (100.00%) free)
  - Free space at $0000-$3fff (16384 bytes)
ROM bank 1 (16384 bytes (100.00%) free)
  - Free space at $0000-$3fff (16384 bytes)
ROM bank 2 (16384 bytes (100.00%) free)
  - Free space at $0000-$3fff (16384 bytes)
ROM bank 3 (16384 bytes (100.00%) free)
  - Free space at $0000-$3fff (16384 bytes)
-------------------------------------------------
---                   RAM                     ---
-------------------------------------------------
RAM slot 4 bank 1 (4096 bytes (50.00%) free)
  - Free space at $1000-$1fff (4096 bytes)
-------------------------------------------------
---           HEADERS AND FOOTERS             ---
-------------------------------------------------
No headers or footers found.
-------------------------------------------------
---                 SUMMARY                   ---
-------------------------------------------------
ROM: 65536 bytes (100.00%) free of total 65536.
RAM: 4096 bytes (50.00%) free of total 8192.

What in this test is important that the last line reads:

RAM: 4096 bytes (50.00%) free of total 8192.

It'd be great if we could create a test that'd verify this.

@jeffythedragonslayer
Copy link
Contributor

We can tail the output and then grep for that line. It would be helpful if CONTRIBUTING.md contained instructions on how to add tests.

@vhelin
Copy link
Owner Author

vhelin commented Feb 21, 2023

Quick note about adding tests:

a) Clone an existing test directory and modify it
or
b) Insert tests into existing test source files / makefiles

No need to list the new tests anywhere, a directory inside tests is considered one test directory

But sure, CONTRIBUTING.md should be updated about this...

@jeffythedragonslayer
Copy link
Contributor

Does the test harness require us to create makefiles for tests though? I feel like this test can be done in a bash script.

@vhelin
Copy link
Owner Author

vhelin commented Feb 21, 2023 via email

@jeffythedragonslayer
Copy link
Contributor

jeffythedragonslayer commented Feb 25, 2023

FYI, those contributing instructions we added got squashed onto a single line when viewed with the github markdown viewer:

image

perhaps we should stick with bullet points

@vhelin
Copy link
Owner Author

vhelin commented Feb 25, 2023

Maybe, but I can live with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants