titzer / virgil

A fast and lightweight native programming language
1.22k stars 42 forks source link

build scripts & test harness in Virgil? #24

Closed diakopter closed 3 years ago

diakopter commented 4 years ago

What do you think about having the build & test scripts written in Virgil? I'm happy to toy around with it if it's a valid endeavor.

titzer commented 4 years ago

I generally like the idea of reducing dependencies on other software. The problem with building and testing though a.) trusting some base-level software to properly report tests passed/failed and b) bringing Virgil to a new platform.

That said, I really am not a big fan of test/bin/src/execute-arch-posix.c, which is essentially a C program trusted to fork and execute native binaries for testing. There is a lot of duplication with parsing the input/output spec of tests that is a pain and maybe better written in another language.

titzer commented 4 years ago

One thing that would be useful though, would be to convert the test suite to universally use the progress program output. It's just a standardized simple text format for all test output that can be processed to produced the "pretty" outputs seen in the test scripts now. Currently, each kind of test has its own ad hoc test output format that is shoehorned into something OK-looking.

titzer commented 3 years ago

I've now converted the test suite to use the progress program output and generally improved the situation.

I think I'll stick with bash for tests now.