OpenAnolis Hardware Compatibility Test SuiteThis test suite to be used to verify your system or component compatibility with anolis on x86 platform Usage$sudo python3.6 ancert -husage: ancert [-h] [-g {System,CPU,Memory,Video,GPU,Storage,Network,NVMe,FC,Kdump}] [-c CASE] [-i INDEX] [--lts_ip LTS_IP] [--list_hardware {System,CPU,Memory,Video,GPU,Storage,Network,NVMe,FC,Kdump}]ancertoptional arguments: -h, --help show this help message and exit -g {System,CPU,Memory,Video,GPU,Storage,Network,NVMe,FC,Kdump}, --category {System,CPU,Memory,Video,GPU,Storage,Network,NVMe,FC,Kdump} Category -c CASE, --case CASE Case -i INDEX, --index INDEX Want to test device index --lts_ip LTS_IP LTS ip address --list_hardware {System,CPU,Memory,Video,GPU,Storage,Network,NVMe,FC,Kdump} List all the hardware on the systemExample: python ancert -h python ancert -g Storage #How to compile ancert Make sure you have the GUN Make tool installed on Anolis OS,If not installed,The installation can be done through yum.For example, $yum install make -yYou should be in the ancert repository root directory,Run the make command;butBefore executing the make command, you need to write the Makefile,How to write a makefile,Please refer to the https://www.gnu.org/software/make/manual/make.html#Makefiles,please touch a Makefile,Let's look at a simple example about Makefile.For example, .PHONY: clean install install: echo "install..." clean: echo "clean..."If you want to build directly on ancert tests, you can expand Makefile on the following.For example, .PHONY: clean install install: @if [ ! -z $(DESTDIR) ];then \ { [ ! -d $(DESTDIR) ] && mkdir -p -m 755 $(DESTDIR); }; \ else\ echo "There is no target path \$$DESTDIR to operate on"; \ fi clean: @if [ ! -z $(DESTDIR) ];then \ echo "rm -rf \$$(DESTDIR)/*........"; \ else\ echo "There is no target path \$$DESTDIR to operate on"; \ fi uninstall: @echo "uninstall..."Of course, you can rewrite the Makefile as you wish.Next the test runs the makefile.Run the make command in the ancert repository root directory.if make first compile,Run the make command,Here's what you should do.For example, $make installif make multiple times in the same path,Run the make command,Here's what you should do.For example, $make uninstall $make installIf the exit status is 0, the execution succeeds. Otherwise, the execution fails.To obtain the command result, perform the following operations.For example, $echo $?Detailed usage reference for make,please make --help. #How to build ancert rpm You need to install rpm-build,make,gcc,gcc-c++ before building the RPM package on Anolis OS,If not installed,The installation can be done through yum.For example, $yum install rpm-build make gcc gcc-c++ -y Then run the build script directly to get the RPM,Run the script in the ancert repository root directory.For example, $sh build_rpm.shObtain the RPM package from the following path.For example, $cd /root/rpmbuild/RPMS/ $find ./ -name "*.rpm"Detailed usage reference for rpmbuild,please rpmbuild --help. Note- please run this test suite as root
- require at least one raw disk for storage test
|
请发表评论