CN117234827A - Multi-platform automatic test method and system based on domestic graphic processor - Google Patents

Multi-platform automatic test method and system based on domestic graphic processor Download PDF

Info

Publication number
CN117234827A
CN117234827A CN202311512967.3A CN202311512967A CN117234827A CN 117234827 A CN117234827 A CN 117234827A CN 202311512967 A CN202311512967 A CN 202311512967A CN 117234827 A CN117234827 A CN 117234827A
Authority
CN
China
Prior art keywords
test
automatic
script
restarting
platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311512967.3A
Other languages
Chinese (zh)
Other versions
CN117234827B (en
Inventor
蔡国
梅瑞麟
季伟伟
周密
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Lingjiu Microelectronics Co ltd
Original Assignee
Wuhan Lingjiu Microelectronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Lingjiu Microelectronics Co ltd filed Critical Wuhan Lingjiu Microelectronics Co ltd
Priority to CN202311512967.3A priority Critical patent/CN117234827B/en
Publication of CN117234827A publication Critical patent/CN117234827A/en
Application granted granted Critical
Publication of CN117234827B publication Critical patent/CN117234827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides a multi-platform automatic test method and system based on a domestic graphic processor, belonging to the technical field of test, wherein a domestic platform library, a graphic processor library and a test case library are built at an automatic test server side; the method comprises the steps of completing comprehensive management of test tasks of different localization platforms and localization graphics processors installed on a plurality of automation test clients by utilizing automation test platform software and automation test tools; through the message distribution mode, the operation time sequence of each automatic test client is controlled, the test resources of a plurality of automatic test clients are unified, a single test task is cooperatively completed, and the automatic test of the automatic test clients with multiple platforms can be realized. The invention manages the whole life cycle of the test task, ensures the integrity of complex test service and improves the test efficiency.

Description

Multi-platform automatic test method and system based on domestic graphic processor
Technical Field
The invention relates to the field of automated testing, in particular to a multi-platform automated testing method and system based on a domestic graphic processor.
Background
Through exploration and development for many years, the localization platform has formed certain autonomous and controllable, and the industry and ecology are gradually sound. Certain instability still exists in the current mainstream domestic platforms, and each device needs to be tested to ensure the quality of the hardware device. The test is an indispensable link of multi-platform standby based on a domestic graphic processor, and the execution of test cases is an important work of daily test of testers and one of more complicated works. Therefore, the method has a set of complete and reliable automatic testing method for multiple platforms of domestic graphic processors and has very important significance.
The existing domestic graphic processor automatic test technology mainly has the following problems:
(1) For a localization platform with personalized requirements, the flexibility is insufficient; for example, in the production, debugging and testing stages, multiple types of automatic tests are required to be simultaneously carried out on different structures and different devices, and the prior art cannot meet the use requirements.
(2) For functional test, batch test and complex operation are carried out; most of the methods are manually executed by testers, and the results are judged by manual signaling and naked eyes by using a simple simulation tool. The method has low efficiency, long time consumption and few thousands of test cases, and is easy to fatigue by manual execution.
Disclosure of Invention
The invention provides a multi-platform automatic test method and system based on a domestic graphic processor aiming at the technical problems existing in the prior art.
According to a first aspect of the present invention, there is provided a multi-platform automated testing method based on a domestic graphic processor, comprising:
step 1: constructing a domestic platform library, a graphic processor library, storing various components of automatic test platform software, constructing a test case library and storing test case execution instruction scripts selected to be tested on an automatic test server side;
step 2: according to test resources applied by a tester to an automatic test server, the automatic test server distributes a plurality of required automatic test clients to the tester, and the plurality of automatic test clients are provided with different localization platforms and localization graphics processors;
step 3: according to the model of the domestic platform and the domestic graphic processor installed on each automatic test client, deploying an automatic test tool, matching corresponding test case sets, and controlling the automatic test client to configure the test case sets to options of the automatic test client;
step 4: the automatic test server side displays all test cases of the automatic test software, so that a tester can select the test cases and send test case execution instructions to the appointed automatic test client side;
step 5: the automatic test client runs and executes the test case script file of the test case from the appointed directory according to the received test case execution instruction and the local platform information;
step 6: and the automatic test tool under the automatic test client executes the automatic test according to the test case script file, displays the current test state locally in real time, and uploads the test result to the automatic test server after the automatic test is finished so as to generate a test report at the automatic test server.
According to a second aspect of the present invention, there is provided a multi-platform automated test system based on a domestic graphic processor, including an automated test server side and a plurality of automated test clients, wherein a plurality of the automated test clients are provided with different domestic platforms and domestic graphic processors;
the automatic test server end is stored with a domestic platform library, a domestic graphic processor series library and a test case library, and different domestic platforms, different corresponding relations between the domestic graphic processors and the test cases; the system is also used for issuing corresponding test cases to the corresponding automatic test clients according to the installation platform of the automatic test clients to be tested and the model of the domestic graphic processor;
each automatic test client is used for executing a test script according to the received automatic test cases, automatically testing related test items and returning test results to the automatic test server.
The invention provides a multi-platform automatic test method and system based on a domestic graphic processor, wherein a domestic platform library, a graphic processor library and a test case library are built at an automatic test server side; the method comprises the steps of completing comprehensive management of test tasks of different localization platforms and localization graphics processors installed on a plurality of automation test clients by utilizing automation test platform software and automation test tools; through the message distribution mode, the operation time sequence of each automatic test client is controlled, the test resources of a plurality of automatic test clients are unified, a single test task is cooperatively completed, and the automatic test of the automatic test clients with multiple platforms can be realized. The invention manages the whole life cycle of the test task, ensures the integrity of complex test service and improves the test efficiency.
Drawings
FIG. 1 is a flow chart of a multi-platform automated testing method based on a domestic graphic processor;
FIG. 2 is a schematic flow chart of a restart test method;
FIG. 3 is a schematic diagram of a restart test method;
FIG. 4 is a flow chart of the S3 sleep test and the S4 sleep test;
FIG. 5 is a flow chart of a method of S3 sleep testing;
FIG. 6 is a flow chart of the method of S4 sleep test;
FIG. 7 is a flow chart of a method for testing a video memory;
FIG. 8 is a flow chart of a performance stability test method;
FIG. 9 is a schematic diagram of a multi-platform automated test system based on a domestic graphic processor according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. In addition, the technical features of each embodiment or the single embodiment provided by the invention can be combined with each other at will to form a feasible technical scheme, and the combination is not limited by the sequence of steps and/or the structural composition mode, but is necessarily based on the fact that a person of ordinary skill in the art can realize the combination, and when the technical scheme is contradictory or can not realize, the combination of the technical scheme is not considered to exist and is not within the protection scope of the invention claimed.
In order to solve the automatic test problem of domestic multiple platforms of domestic graphic processors, an automatic test solution and an automatic test method which are more convenient and more beneficial to maintenance are needed, so that scientific research and production of a domestic platform support project can be smoothly carried out, the control of quality in the development process is continuously perfected through a test driving development means, the cost of engineering projects can be greatly reduced, project development period is saved, the labor force of testers is reduced, the pressure of the scientific research production process is reduced, and the iterative process of testing is reduced.
For this reason, the present invention provides a multi-platform automated testing method based on a domestic graphic processor, as shown in fig. 1, the automated testing method includes:
step 1: and constructing a domestic platform library, a graphic processor library, storing various components of the automatic test platform software, constructing a test case library and storing test case execution instruction scripts selected to be tested on an automatic test server side.
It can be understood that the invention comprises an automatic test server side and a plurality of automatic test clients, wherein, a domestic platform library, a graphic processor library and various components for storing automatic test platform software are constructed on the automatic test server side, wherein, the domestic platform library comprises a plurality of different domestic platforms, the graphic processor library comprises different series of graphic processors which are mainly represented by the model numbers of the graphic processors, the test case library comprises a plurality of test cases, wherein, the test cases corresponding to different domestic platforms and different graphic processors are different, and the automatic test server side also comprises execution scripts of each test case.
Step 2: according to the test resources applied by the testers to the automatic test server, the automatic test server distributes a plurality of required automatic test clients to the testers, and the automatic test clients are provided with different localization platforms and localization graphics processors.
It can be understood that the tester applies for the test resources from the automated test server according to the clients to be tested, and the automated test server allocates a plurality of corresponding automated test clients as the automated test clients to be tested according to the test resources. The automatic test client exists in a form comprising a localization platform and a localization graphics processor, and supports a localization operation system.
Step 3: according to the model of the domestic platform and the domestic graphic processor installed on each automatic test client, deploying an automatic test tool, matching corresponding test case sets, and controlling the automatic test clients to configure the test case sets to the options of the automatic test clients.
It can be understood that the automated test server deploys an automated test tool on each automated test client according to the model of the domestic platform and the domestic graphics processor installed on each automated test client to be tested, and matches a corresponding test case set for each automated test client. Where testing a client generally requires testing multiple test items of the client, each testability requires testing with respect to a test case. Therefore, the test case set issued by the automatic test server side is distributed to the corresponding test items of the multiple automatic test clients. And testing the test items of the automatic test client by executing the corresponding test cases.
Step 4: the automatic test server side displays all test cases of the automatic test software, so that a tester can select the test cases and send test case execution instructions to the appointed automatic test client side.
It can be understood that the automated test server side can display all test cases of the automated test client side to a tester, so that the tester can select a corresponding test case according to the test items, and send a test case execution instruction to the automated test client side according to the selected test case.
Step 5: and the automatic test client runs the test case script file of the test case from the appointed directory according to the received test case execution instruction and the local platform information and executes the test case script file.
It can be understood that, in the present invention, the test items of the automated test client mainly include a restart test, an S3 sleep test, an S4 sleep test, a video memory test, and a performance stability test, so the test case execution instruction sent by the automated test server to the automated test client mainly includes a restart instruction, an S3 sleep instruction, an S4 sleep instruction, a video memory analysis instruction, and a performance stability instruction. And the automated test client runs the test case script file of the test case to execute the test according to the test case execution instructions and the platform information of the automated test client.
Step 6: and the automatic test tool under the automatic test client executes the automatic test according to the test case script file, displays the current test state locally in real time, and uploads the test result to the automatic test server after the automatic test is finished so as to generate a test report at the automatic test server.
It can be understood that different platforms installed on the automated test client correspond to different automated test tools, and the automated test tools are used for executing the automated test according to the test case script file, and uploading the test result to the automated test server. And the automatic test server terminal automatically and synchronously modifies a worksheet named as a test report in the template according to the test case, synchronously updates data and a chart in the test report, and generates the test report.
Referring to fig. 2, a schematic diagram of a restart test method, the restart test method mainly includes the following steps:
s11, constructing a restarting system service file reboot.service, restarting an auxiliary script reboot.sh and restarting a test script reboot.sh, and adopting a joint calling mode in a main program to realize an automatic restarting test function.
S12, judging the validity of the data input by the user, if the data meets the validity condition, respectively creating a reboothnumber log file and a reboothtime log file, and storing the test times and test interval time input by the user, wherein the test times are the times of repeated tests for restarting the automatic test client, and the test interval time is the interval between two tests.
S13, adding the system service script to the system starting project record through the restarting auxiliary script, adding automatic restarting service in the system starting project record, and enabling the automatic restarting service to automatically run a restarting test script every time the system is started and then restarting once.
S14, after the host computer is restarted for the first time, a restart test script reboothtest.sh can acquire log files stored in a restart auxiliary script, acquire test interval and test times data in the log files, store the current system time information date stacking increment in a logbase log, and transmit line number information of the counted logbase log to the logbase log, wherein the line number information indicates the current tested times. And comparing and judging the number of the lines with the preset test times, if the preset test times are larger than the number of the lines, continuously executing restarting operation, and continuously accumulating the line number information after restarting. If the preset test times are smaller than the number of lines, restarting is stopped, line number information logbak.log is deleted, the system restarting service is stopped, and printing information of 'test XX times are completed' is output.
Referring to fig. 3, a program flow chart of a restart test method is shown, firstly, a restart test is started, a reboot. Sh restart auxiliary script is executed, the number of tests set by a user is saved to a reboot number log, and a test time interval is saved to a reboot time log. And (3) newly adding a system starting service item, restarting the host if the test interval time is longer than 15s, automatically running a reboothtest.sh script by the system starting service, importing date information into logeboot.log when restarting the host, importing log statistics of the log numbers of the logeboot.log into logbak.log, judging whether the test times set by a user are longer than the log numbers of the logbak.log, and if so, restarting the host continuously, otherwise, ending the restart test of the automatic test client.
Referring to fig. 4, a flowchart of an S3 sleep test and an S4 sleep test is shown, wherein a function test is started, a test number and a test time interval of the S3 sleep test are set, and a test number and a test time interval of the S4 sleep test are set, and the S3 sleep test and the S4 sleep test are performed based on a test script, respectively. And when the test time interval of the S3 is more than 5S, a standby request is sent out, the processes and the kernel tasks in the host are frozen, the system equipment is suspended to the memory, and the system is in standby. And when the test time interval of S4 is greater than 30S, a dormancy request is sent, the process and the kernel task of the host are frozen, the system equipment is suspended to a hard disk, and the system is dormant. If the interrupt is awakened, the process and the kernel task are unfrozen, the test counter is increased by 1, one-time test is completed, the S3 sleep test and the S4 sleep test are performed again for a plurality of times until the times of the S3 sleep test and the times of the S4 sleep test reach the respective set test times, and the S3 sleep test and the S4 sleep test of the automatic test client are ended.
Referring to fig. 5, the method for S3 sleep test mainly includes the following steps:
s21, constructing an S3 test script S3.Sh;
s22, executing the S3 test script S3.Sh, obtaining the test interval time and the test times set by a user, setting the initial value of the test count variable num to be 1, wherein num represents the current tested times, judging whether the set test interval time is longer than a first set duration, if yes, continuously judging whether the preset test times are longer than the test count variable num through a while cycle body, and if yes, transmitting the test interval time and the test times to parameters of an rtcwake command, and continuously starting a standby wake test;
s23, after each standby wakeup is carried out through an rtcwake command, automatically retrieving an S3 test script S3.Sh, storing information with error and warning and date information in a system dmesg log into the S3.Log, and increasing a test count variable num of a while cycle by 1; the rtcwake command continues to run until the preset test times are equal to the test count variable num, jump out of the while cycle, at this time, the S3 test script S3.Sh outputs the test completion information, and exit the S3 test script S3.Sh.
When the automatic test client is subjected to S3 sleep test, the test interval time and the test times set by a user are obtained, the test interval time and the test times are sent to the control target system through the rtcwake instruction, the target system standby wake module automatically judges the state signal of the current equipment power module, judges whether the state signal is in a presettable state, when the state signal is in the presettable state, the standby wake-up equipment is carried out until the preset test times are the same as the actual test times, the S3 standby wake-up test is automatically stopped, the test completion information is output, when an abnormality occurs in the S3 standby wake-up process, the test is stopped, and the current abnormality information is stored into an error log.
Referring to fig. 6, the method of S4 sleep test includes the steps of:
s31, constructing an S4 test script S4.Sh;
s32, executing the S4 test script S4.Sh, obtaining test interval time and test times, setting the initial value of a test count variable num to be 1, judging the model of the current platform CPU through an uname-m command if the set test interval time is longer than a second set duration, continuously judging whether the preset test times are longer than the test count variable num through a while cycle body if the model of the current platform CPU is x 86-64 or Loongarch64, and transmitting the test interval time and the test times to parameters of an rtcwake command and continuously starting a sleep awakening test if the preset test times are judged to be 'yes';
after S33, x86_64 or Loongarch64 architecture equipment is waken up, S4 test script S4.Sh automatically retrieves and stores information with error and rolling and date information in a system dmesg log into S4.Log, and test count variable num of a while cycle is increased by 1; the rtcwake command continues to run until the preset test times are equal to the test count variable num, jump out of the while cycle, at this time, the S4 test script S4.Sh outputs the test completion information, and exit the S4 test script S4.Sh.
S34, if the model of the CPU of the current platform is aarch64, writing a disk in a/sys/power/state file of a Linux system, and simultaneously, performing S4 test by a method of writing a reboot in the/sys/power/disk file;
after the equipment of the aarch64 architecture is in dormancy and wakes up, the S4 test script S4.Sh automatically retrieves and stores the information with error and logging and date information in the system dmesg log into the S4.Log, the test count variable num is increased by 1, the dormancy and wakes up test continues to run until the preset test times are equal to the test count variable num, and the cycle is jumped out, at the moment, the S4 test script S4.Sh outputs the test completion information, and the S4 test script S4.Sh is exited.
The invention provides an S4 dormancy wakeup test function, wherein the S4 dormancy wakeup test function obtains test interval time and test times set by a user, automatically judges the model of a current platform framework and an external wakeup state signal through a dormancy wakeup unit, generates an internal wakeup control signal of a control unit according to the external wakeup state signal, sets the internal wakeup control signal of the control unit to carry out dormancy wakeup equipment when the wakeup requirement is met, automatically stops the S4 dormancy wakeup test and outputs test completion information until the preset test times are the same as the actual test times, stops the test when abnormality occurs in the S4 dormancy wakeup process, and stores the current abnormality information into an error log.
Referring to fig. 7, for a schematic diagram of a video memory test on an automated test client, the steps of the video memory test include:
s41, constructing a GPU video memory test script vramtest.sh;
s42, executing a vramtest.sh script, obtaining the size and the test times of a test video memory set by a user, circularly running a video memory test program corresponding to the test times, setting a multi-user starting mode through a command sudo systemctl set-default multi-user.target, executing a sudo X-noreset to empty a display area, obtaining the video memory starting address of the video card equipment through a lspci command, and dividing a video memory area with a preset size after the video memory starting address to perform the video memory test;
s43, after the vramtest.sh script is operated, performing a multi-item video memory test, wherein the video memory test items comprise Random Value, compare XOR, compare SUB, compare MUL, compare DIV, compare OR, compare AND, sequential Increment, solid Bits, block Sequential, checkerboard, bit space, bit Flip, walking Ones AND Walking Zeroes, after the video memory test is finished, saving test information into log files, AND automatically exiting the video memory test script.
The method comprises the steps of firstly judging whether the graphic processor is the graphic processor of the test case through searching the graphic processor equipment, storing a judging result after confirming the graphic processor of the test case, then creating and opening equipment nodes of the corresponding graphic processor through a direct rendering manager, and simultaneously obtaining related information of the equipment nodes; and receiving a video memory parameter with a specified size input by a user through equipment input and output operation in a user space to perform a video memory test, wherein the video memory test can be one type of option test or a combination test of a plurality of options, and detecting whether errors such as address abnormality and address illegality occur in the video memory address reading and writing process or not through one or a plurality of combinations of random values, exclusive or comparison, subtraction, multiplication, division, OR operation and the like, if the video memory test passes, outputting the completion information of the corresponding option of the test, and if the video memory address reading and writing abnormality or the address illegality occur in the video memory test process, stopping the test and simultaneously storing the error information as an error log.
Referring to fig. 8, for a schematic diagram of testing performance stability of an automated test client, the performance stability testing steps include:
s41, respectively constructing test scripts glxgels.sh, glmark2.sh and stability.sh;
s42, executing a glxgels.sh script, obtaining the number of tests and the number of tests set by a user, starting the glxgels test program corresponding to the number according to the number of tests, and circularly testing all the glxgels test programs for a plurality of times according to the number of tests;
s43, executing a glmark2.Sh script, obtaining the number of tests and the number of tests set by a user, starting a corresponding number of glmark2 test programs according to the number of tests, and circularly testing all the glmark2 test programs for a plurality of times according to the number of tests; the method comprises the steps of carrying out a first treatment on the surface of the
S44, executing a stability.sh script, and automatically starting a video cyclic playing test, a six-group glmark2 test and a group of x11perf-2D tests.
Referring to fig. 9, the invention provides a multi-platform automated testing system based on a domestic graphic processor, which comprises an automated testing server side and a plurality of automated testing clients, wherein the plurality of automated testing clients are provided with different domestic platforms and domestic graphic processors. The automatic test server end is stored with a domestic platform library, a domestic graphic processor series library and a test case library, and different domestic platforms, different corresponding relations between the domestic graphic processors and the test cases; the system is also used for issuing corresponding test cases to the corresponding automatic test clients according to the installation platform of the automatic test clients to be tested and the model of the domestic graphic processor; each automatic test client is used for executing a test script according to the received automatic test cases, automatically testing related test items and returning test results to the automatic test server.
It can be understood that the multi-platform automatic test system mainly comprises an automatic test server and a plurality of automatic test clients, wherein the automatic test server is connected with each automatic test client through a communication network, and different automatic test clients are also connected through the communication network, so that the operation coordination instantaneity and the interaction data accuracy among the automatic test clients are ensured.
The automatic test server side is provided with automatic test server side platform software, the automatic test server side platform software is a unified entry for providing test services for testers, and comprises an automatic test server side assembly, a test case library, a domestic graphic processor series library and a domestic platform library, wherein the automatic test server side platform software is used for distributing automatic test clients, assisting the testers in checking and operating the automatic test clients, forming a test environment formed by a plurality of automatic test clients according to test requirements, and controlling global execution time sequences of the automatic test clients.
The automated test client comprises an automated test tool, a domestic graphic processor and an automated test case, and is responsible for executing the automated test and returning test results.
The test case library stores test case files and detailed information which are operated by an automatic test tool under a certain platform, wherein the test case files comprise software names, test item identifications, test item descriptions, test case names, test case identifications, test case descriptions, supported operating system types, supported CPU (Central processing Unit) types, last test results and the like for the test cases.
The domestic graphics processor serial library stores domestic graphics processor drivers and metadata information including software names, versions, names of various components contained in the software, supported architecture information, supported operating system information and installation scripts.
The embodiment of the invention provides a multi-platform automatic test method and system based on a domestic graphic processor, which constructs a domestic platform library, a graphic processor library and a test case library; utilizing the automatic test platform software and the automatic test tool to complete the comprehensive management of the test tasks of the domestic platform and the domestic graphic processor of a plurality of automatic test clients; and controlling the operation time sequence of each automatic test client through a Master-Slave message distribution mode, uniformly integrating the test resources of a plurality of automatic test clients, and cooperatively completing a single test task. The invention manages the whole life cycle of the test task, ensures the integrity of complex test service and improves the test efficiency.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (7)

1. A multi-platform automatic test method based on a domestic graphic processor is characterized by comprising the following steps:
step 1, constructing a domestic platform library, a graphic processor library, storing various components of automatic test platform software, constructing a test case library and storing test case execution instruction scripts selected to be tested on an automatic test server side;
step 2, according to test resources applied by a tester to an automatic test server, the automatic test server distributes a plurality of required automatic test clients to the tester, and the automatic test clients are provided with different localization platforms and localization graphics processors;
step 3, according to the model of the domestic platform and the domestic graphic processor installed on each automatic test client, deploying an automatic test tool, matching corresponding test case sets, and controlling the automatic test client to configure the test case sets to the options of the automatic test client;
step 4, the automatic test server side displays all test cases of the automatic test software for a tester to select the test cases and sends test case execution instructions to the appointed automatic test client side;
step 5, the automatic test client runs the test case script file of the test case from the appointed catalogue and executes the test case script file according to the received test case execution instruction and the local platform information;
step 6, the automatic test tool under the automatic test client executes the automatic test according to the test case script file and displays the current test state in real time locally, and the test result is uploaded to the automatic test server after the automatic test is finished so as to generate a test report at the automatic test server;
the test case execution instruction comprises a restarting instruction, and the automatic test client executes a restarting test according to the restarting instruction and a corresponding test case script file;
the restart test includes:
s11, constructing a restarting system service file reboot.service, restarting an auxiliary script reboot.sh and restarting a test script reboot.sh, and adopting a joint calling mode in a main program to realize an automatic restarting test function;
s12, judging the validity of the data input by the user, if the validity condition is met, respectively creating a reboothnumber log file and a reboothtime log file to save the test times and the test interval time input by the user;
s13, adding a system service script to a system starting project record through a restarting auxiliary script reboot.sh, adding automatic restarting service in the system starting project record, enabling the automatic restarting service to automatically run a restarting test script every time the system is started, and restarting once;
s14, after the host computer is restarted for the first time, a restart test script reboothtest.sh can acquire log files stored in a restart auxiliary script, test interval time and test times in the log files are acquired, current system time information date stacking type increment is stored in a logeboot.log, and line number information of the counted logeboot.log is transmitted to the logbak.log, wherein the line number information represents the current tested times; comparing and judging the number of the lines with the preset test times, if the preset test times are larger than the number of the lines, continuously executing restarting operation, and continuously accumulating the line number information after restarting; if the preset test times are smaller than the number of lines, restarting is stopped, line number information is deleted, the system restarting service is stopped, and the restarting test of the automatic test client is finished.
2. The multi-platform automated test method of claim 1, wherein the test case execution instructions further comprise an S3 sleep instruction, an S4 sleep instruction, a memory resolution instruction, and a performance stability instruction;
correspondingly, the automatic test client executes the automatic test according to the test case script file corresponding to the S3 sleep instruction, the S4 sleep instruction, the video memory analysis instruction and the performance stability instruction, and respectively performs the S3 sleep test, the S4 sleep test, the video memory test and the stability test.
3. The multi-platform automated testing method of claim 2, wherein the S3 sleep test comprises:
s21, constructing an S3 test script S3.Sh;
s22, executing the S3 test script S3.Sh, obtaining the test interval time and the test times set by a user, setting the initial value of the test count variable num to be 1, wherein num represents the current tested times, judging whether the set test interval time is longer than a first set duration, if yes, continuously judging whether the preset test times are longer than the test count variable num through a while cycle body, and if yes, transmitting the test interval time and the test times to parameters of an rtcwake command, and continuously starting a standby wake test;
s23, after each standby wakeup is carried out through an rtcwake command, automatically retrieving an S3 test script S3.Sh, storing information with error and warning and date information in a system dmesg log into the S3.Log, and increasing a test count variable num of a while cycle by 1; the rtcwake command continues to run until the preset test times are equal to the test count variable num, jump out of the while cycle, at this time, the S3 test script S3.Sh outputs the test completion information, and exit the S3 test script S3.Sh.
4. The multi-platform automated testing method of claim 2, wherein the S4 testing comprises:
s31, constructing an S4 test script S4.Sh;
s32, executing the S4 test script S4.Sh, obtaining test interval time and test times, setting the initial value of a test count variable num to be 1, judging the model of the current platform CPU through an uname-m command if the set test interval time is longer than a second set duration, continuously judging whether the preset test times are longer than the test count variable num through a while cycle body if the model of the current platform CPU is x 86-64 or Loongarch64, and transmitting the test interval time and the test times to parameters of an rtcwake command and continuously starting a sleep awakening test if the preset test times are judged to be 'yes';
after S33, x86_64 or Loongarch64 architecture equipment is waken up, S4 test script S4.Sh automatically retrieves and stores information with error and rolling and date information in a system dmesg log into S4.Log, and test count variable num of a while cycle is increased by 1; the rtcwake command continuously runs until the preset test times are equal to a test count variable num, jumping out of a while cycle, outputting test completion information by the S4 test script S4.Sh, and exiting the S4 test script S4.Sh;
s34, if the model of the CPU of the current platform is aarch64, writing a disk in a/sys/power/state file of a Linux system, and simultaneously, performing S4 test by a method of writing a reboot in the/sys/power/disk file;
after the equipment of the aarch64 architecture is in dormancy and wakes up, the S4 test script S4.Sh automatically retrieves and stores the information with error and logging and date information in the system dmesg log into the S4.Log, the test count variable num is increased by 1, the dormancy and wakes up test continues to run until the preset test times are equal to the test count variable num, and the cycle is jumped out, at the moment, the S4 test script S4.Sh outputs the test completion information, and the S4 test script S4.Sh is exited.
5. The multi-platform automated testing method of claim 2, wherein the video memory testing comprises:
s41, constructing a GPU video memory test script vramtest.sh;
s42, executing a vramtest.sh script, obtaining the size and the test times of a test video memory set by a user, circularly running a video memory test program corresponding to the test times, setting a multi-user starting mode through a command sudo systemctl set-default multi-user.target, executing a sudo X-noreset to empty a display area, obtaining the video memory starting address of the video card equipment through a lspci command, and dividing a video memory area with a preset size after the video memory starting address to perform the video memory test;
s43, after the vramtest.sh script is operated, performing multi-item video memory test, after the video memory test is finished, saving the test information into a log file, and automatically exiting the video memory test script.
6. The multi-platform automated testing method of claim 2, wherein the stability test comprises:
s51, respectively constructing test scripts glxgels.sh, glmark2.sh and stability.sh;
s52, executing a glxgels.sh script, obtaining the number of tests and the number of tests set by a user, starting the glxgels test program corresponding to the number according to the number of tests, and circularly testing all the glxgels test programs for a plurality of times according to the number of tests;
s53, executing a glmark2.Sh script, obtaining the number of tests and the number of tests set by a user, starting a corresponding number of glmark2 test programs according to the number of tests, and circularly testing all the glmark2 test programs for a plurality of times according to the number of tests;
s44, executing a stability.sh script, and automatically starting a video cyclic playing test, a six-group glmark2 test and a group of x11perf-2D tests.
7. The multi-platform automatic test system based on the domestic graphic processor is characterized by comprising an automatic test server side and a plurality of automatic test clients, wherein the automatic test clients are provided with different domestic platforms and domestic graphic processors;
the automatic test server end is stored with a domestic platform library, a domestic graphic processor series library and a test case library, and different domestic platforms, different corresponding relations between the domestic graphic processors and the test cases; the system is also used for issuing corresponding test cases to the corresponding automatic test clients according to the installation platform of the automatic test clients to be tested and the model of the domestic graphic processor;
each automatic test client is used for executing a test script according to the received automatic test cases, automatically testing related test items and returning test results to the automatic test server;
the test case execution instruction comprises a restarting instruction, and the automatic test client executes a restarting test according to the restarting instruction and a corresponding test case script file;
the restart test includes:
constructing a restarting system service file reboot.service, a restarting auxiliary script reboot.sh and a restarting test script reboot.sh, and adopting a joint calling mode in a main program to realize an automatic restarting test function;
judging the validity of the data input by the user, if the validity condition is met, respectively creating a reboothnumber log file and a reboothtime log file to save the test times and the test interval time input by the user;
adding a system service script to a system starting project record through a restarting auxiliary script reboot.sh, adding automatic restarting service in the system starting project record, automatically running a restarting test script by the automatic restarting service every time the system is started, and restarting once;
after the host computer is restarted for the first time, a restart test script reboothtest.sh can acquire a log file stored in a restart auxiliary script, acquire test interval time and test times in the log file, store the current system time information date stacking increment in a logeboot.log, and transmit the line number information of the counted logeboot.log to the logbak.log, wherein the line number information represents the current tested times; comparing and judging the number of the lines with the preset test times, if the preset test times are larger than the number of the lines, continuously executing restarting operation, and continuously accumulating the line number information after restarting; if the preset test times are smaller than the number of lines, restarting is stopped, line number information is deleted, the system restarting service is stopped, and the restarting test of the automatic test client is finished.
CN202311512967.3A 2023-11-14 2023-11-14 Multi-platform automatic test method and system based on domestic graphic processor Active CN117234827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311512967.3A CN117234827B (en) 2023-11-14 2023-11-14 Multi-platform automatic test method and system based on domestic graphic processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311512967.3A CN117234827B (en) 2023-11-14 2023-11-14 Multi-platform automatic test method and system based on domestic graphic processor

Publications (2)

Publication Number Publication Date
CN117234827A true CN117234827A (en) 2023-12-15
CN117234827B CN117234827B (en) 2024-02-13

Family

ID=89093305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311512967.3A Active CN117234827B (en) 2023-11-14 2023-11-14 Multi-platform automatic test method and system based on domestic graphic processor

Country Status (1)

Country Link
CN (1) CN117234827B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120048350A (en) * 2010-11-05 2012-05-15 재단법인대구경북과학기술원 Automatic test system for micro controller unit and method thereof
US20150234737A1 (en) * 2014-02-14 2015-08-20 Samsung Electronics Co., Ltd. Test system of system on chip and test method thereof
KR20150096612A (en) * 2014-02-14 2015-08-25 삼성전자주식회사 Test system for soc and test method thereof
US20150302126A1 (en) * 2014-04-18 2015-10-22 Breker Verification Systems Testing soc with portable scenario models and at different levels
CN109582519A (en) * 2018-12-06 2019-04-05 郑州云海信息技术有限公司 A kind of server GPU equipment powercycle stability test method
CN111934953A (en) * 2020-08-07 2020-11-13 北京计算机技术及应用研究所 Batch testing method based on domestic processor computer platform
WO2020253079A1 (en) * 2019-06-17 2020-12-24 平安科技(深圳)有限公司 Jmeter-based distributed performance test method and apparatus, device, and storage medium
CN113051155A (en) * 2021-03-11 2021-06-29 中国信息通信研究院 Control system and control method of automatic test platform
CN113553226A (en) * 2021-07-23 2021-10-26 曙光信息产业股份有限公司 Startup and shutdown testing method and device, testing system, electronic equipment and storage medium
CN113568791A (en) * 2021-07-14 2021-10-29 麒麟软件有限公司 Automatic testing tool and method for server operating system based on multi-CPU architecture
CN114546747A (en) * 2021-12-31 2022-05-27 中电科技(北京)股份有限公司 BMC cold restart pressure test system and method
CN115640181A (en) * 2022-10-31 2023-01-24 芯动微电子科技(武汉)有限公司 System and method for testing image processing device
CN116089181A (en) * 2022-11-25 2023-05-09 武汉凌久微电子有限公司 Automatic testing method for GPU systemization

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120048350A (en) * 2010-11-05 2012-05-15 재단법인대구경북과학기술원 Automatic test system for micro controller unit and method thereof
US20150234737A1 (en) * 2014-02-14 2015-08-20 Samsung Electronics Co., Ltd. Test system of system on chip and test method thereof
KR20150096612A (en) * 2014-02-14 2015-08-25 삼성전자주식회사 Test system for soc and test method thereof
US20150302126A1 (en) * 2014-04-18 2015-10-22 Breker Verification Systems Testing soc with portable scenario models and at different levels
CN109582519A (en) * 2018-12-06 2019-04-05 郑州云海信息技术有限公司 A kind of server GPU equipment powercycle stability test method
WO2020253079A1 (en) * 2019-06-17 2020-12-24 平安科技(深圳)有限公司 Jmeter-based distributed performance test method and apparatus, device, and storage medium
CN111934953A (en) * 2020-08-07 2020-11-13 北京计算机技术及应用研究所 Batch testing method based on domestic processor computer platform
CN113051155A (en) * 2021-03-11 2021-06-29 中国信息通信研究院 Control system and control method of automatic test platform
CN113568791A (en) * 2021-07-14 2021-10-29 麒麟软件有限公司 Automatic testing tool and method for server operating system based on multi-CPU architecture
CN113553226A (en) * 2021-07-23 2021-10-26 曙光信息产业股份有限公司 Startup and shutdown testing method and device, testing system, electronic equipment and storage medium
CN114546747A (en) * 2021-12-31 2022-05-27 中电科技(北京)股份有限公司 BMC cold restart pressure test system and method
CN115640181A (en) * 2022-10-31 2023-01-24 芯动微电子科技(武汉)有限公司 System and method for testing image processing device
CN116089181A (en) * 2022-11-25 2023-05-09 武汉凌久微电子有限公司 Automatic testing method for GPU systemization

Also Published As

Publication number Publication date
CN117234827B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
US9940225B2 (en) Automated error checking system for a software application and method therefor
US20150193229A1 (en) Efficient propagation of software based on snapshot technologies enabling more efficient informal software builds
CN104252481A (en) Dynamic check method and device for consistency of main and salve databases
CN102279766B (en) Method and system for concurrently simulating processors and scheduler
US10095611B1 (en) Methodology for unit test and regression framework
JP2009265668A (en) Training simulator for engineering project
Kim et al. Performance testing of mobile applications at the unit test level
CN109359020A (en) Start time test method and device, computer installation and storage medium
CN111309734B (en) Method and system for automatically generating table data
CN109144701A (en) A kind of task flow management method, device, equipment and system
CN112068852A (en) Method, system, equipment and medium for installing open source software based on domestic server
US20130013283A1 (en) Distributed multi-pass microarchitecture simulation
CN110134598B (en) Batch processing method, device and system
CN104317685A (en) Starting method of calculator system
CN113760462B (en) Construction method and device for verification environment of dispatching automation system
CN117234827B (en) Multi-platform automatic test method and system based on domestic graphic processor
US8892956B2 (en) Electronic device and method for managing test results
CN112052070A (en) Application containerization evaluation method and device, electronic equipment and storage medium
CA2524835C (en) Method and apparatus for a database workload simulator
CN115185825A (en) Interface test scheduling method and device
CN112181403B (en) Development operation and maintenance integrated implementation method, device, equipment and readable storage medium
CN114879977A (en) Application deployment method, device and storage medium
CN115204081A (en) Chip simulation method, chip simulation platform, chip simulation system, and computer-readable storage medium
CN111814415B (en) Efficient regression testing method for chip verification
CN114692382B (en) Management method and device for nuclear power simulation model development data and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant