How to test packages with test case or test suit in them?


I have worked on mips-r6 for several months. Now I want to test it. Because of no hardware, so I want to
test it in Qemu environment. There are many packages in openwrt and there are test suites or test cases in packages. but we use cross compiler to compile openwrt, so commands "make check" or "make tests" can not be used. they are ignored during compiling process.

So I want to know how to test packages in openwrt project when it is compiled with cross compiler. Or Can we compile openwrt or packages by native compiler when openwrt is running in Qemu environment?

Thanks at first.

I'm lost how one can natively compile on a different CPU. That's an oxymoron. Also, my answer would be to test the software on the appropriate hardware...but you noted:

So, I'm not sure how you can test mips-r6 binary software without a mips-r6 CPU?

I want to install openwrt image in Qemu for mips-r6. Then I want to install compiler of mips-r6 in openwrt image. I don't know if there is anybody to do it.
By the way, I want to know how to test package. By test suit or test case in packages? or by other way?

thank you very much.

Understood; but makes no sense unless the host CPU is mips-r6 also.

You must test on mips-r6.


  • Are you trying to build an mips-r6 emulator?
  • Why do you need one without mips-r6 hardware?

Use a mips-r6 device.

I run mips-r6 Qemu on X86 host, then run mips-r6 openwrt image in Qemu.

There is a mips emulator in Qemu-4.0.0. I just specify CPU to mips32r6-generic to run image which is compiled by mips-r6 cross compiler on X86 host.

I will get a board with mips-r6 CPU after several months. Now I should prepare openwrt kernel and pacakges for it.

By the way, ask a question:
If we run openwrt on ARM board, then we set up native toolchain on the board, and compile test cases or test suites of packages, then test packages. Right? or other way?

Thank you very much.