sifive / freedom-tools

Tools for SiFive's Freedom Platform
217 stars 52 forks source link

test suite for freedom-tools ? #78

Closed duchao713 closed 3 years ago

duchao713 commented 3 years ago

Hi,

Is it possible to run a testsuite for freedom-tools repository ? such as check-gcc ? which is possible with riscv-gnu-toolchain.

I'm asking because I did not see riscv-dejagnu under freedom-tools.

Thank you.

jim-wilson commented 3 years ago

freedom-tools doesn't have the testing infrastructure that riscv-gnu-toolchain has. However, the individual tools testing should still work. So if you cd into the gcc build dir, and run make check, that should still work. However, you will need to provide your own dejagnu environment. You will need a RISC-V simulator, a dejagnu with RISC-V support, and special options to pass to make to tell it to run RISC-V programs on the simulator. You can get all of this from riscv-gnu-toolchain if you don't already have it. I haven't tried this myself.

It is probably easier to just do this testing inside riscv-gnu-toolchain though which is what we do. We should have a riscv-gnu-toolchain tree somwhere with the right versions, but I don't know where it is, and you don't really need it anyways. Just clone riscv-gnu-toolchain, then replace riscv-binutils, riscv-gcc, riscv-newlib, etc with the ones that freedom-tools uses, and you can do the usual riscv-gnu-toolchain testing.

duchao713 commented 3 years ago

freedom-tools doesn't have the testing infrastructure that riscv-gnu-toolchain has. However, the individual tools testing should still work. So if you cd into the gcc build dir, and run make check, that should still work. However, you will need to provide your own dejagnu environment. You will need a RISC-V simulator, a dejagnu with RISC-V support, and special options to pass to make to tell it to run RISC-V programs on the simulator. You can get all of this from riscv-gnu-toolchain if you don't already have it. I haven't tried this myself.

It is probably easier to just do this testing inside riscv-gnu-toolchain though which is what we do. We should have a riscv-gnu-toolchain tree somwhere with the right versions, but I don't know where it is, and you don't really need it anyways. Just clone riscv-gnu-toolchain, then replace riscv-binutils, riscv-gcc, riscv-newlib, etc with the ones that freedom-tools uses, and you can do the usual riscv-gnu-toolchain testing.

Thanks Jim.

I already took your proposal and it works.