Testing methods, devices, and hardware testing platforms for embedded hardware
By compiling and automatically writing test programs for embedded hardware using a server, the problem of low automation in embedded hardware testing is solved, and a highly efficient automated testing process is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-03-13
AI Technical Summary
The current embedded hardware architecture has a low level of testing automation, resulting in a waste of manpower.
This invention provides a testing method for embedded hardware, which compiles test programs on a server and automatically writes the compiled programs into the target hardware, receives test results, and supports the use of loader modules and programmers to adapt to different hardware structures.
It has automated embedded hardware testing, reduced manpower waste, and improved testing efficiency and automation.
Smart Images

Figure CN114328058B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hardware, and more specifically, to a method for testing embedded hardware, an apparatus thereof, a computer-readable storage medium, a processor, and a hardware testing platform. Background Technology
[0002] Current testing of embedded hardware architectures is constrained by the design ideas of different hardware product providers. Testers need to write test programs into the hardware architecture under test, obtain test results, and then erase the program from the hardware architecture. This results in low automation and waste of manpower.
[0003] The information disclosed above in the background section is only intended to enhance the understanding of the background art of the art described herein. Therefore, the background art may contain certain information that does not constitute prior art known to those skilled in the art in this country. Summary of the Invention
[0004] The main objective of this application is to provide a testing method, apparatus, computer-readable storage medium, processor, and hardware testing platform for embedded hardware, in order to solve the problem of low automation in the testing of embedded hardware structures in the prior art.
[0005] According to one aspect of the present invention, a method for testing embedded hardware is provided, comprising: receiving a compiler, wherein the compiler is obtained by a server compiling a test program for target hardware; writing the compiler into the corresponding target hardware, wherein the target hardware is hardware capable of running the compiler; and receiving a test result, wherein the test result is obtained by the target hardware running the compiler.
[0006] Optionally, writing the compiler into the corresponding target hardware includes: determining the target hardware corresponding to the compiler; and writing the compiler into the target hardware.
[0007] Optionally, writing the compiler into the target hardware includes: determining the programmer corresponding to the target hardware; and sending the compiler to the programmer so that the programmer writes the compiler into the target hardware.
[0008] Optionally, after receiving the test results, the method further includes: generating first feedback information and sending it to the programmer, so that the programmer erases the compiler in the target hardware.
[0009] Optionally, the target hardware includes a loader module. Writing the compiler into the target hardware includes: sending the compiler to the loader module so that the loader module writes the compiler into a test area, the test area being the area where the target hardware executes the compiler.
[0010] Optionally, after receiving the test results, the method further includes: generating second feedback information and sending it to the loader module, so that the loader module erases the compiler in the test area.
[0011] According to another aspect of the present invention, a method for testing embedded hardware is also provided, comprising: receiving a compiler, wherein the compiler is obtained by a server compiling a test program for target hardware, and the target hardware is hardware capable of running the compiler; determining whether a loader module exists in the target hardware corresponding to the compiler, and generating a determination result; determining a writing method of the compiler based on the determination result; writing the compiler into the target hardware according to the writing method; and receiving a test result, wherein the test result is obtained by the target hardware running the compiler.
[0012] Optionally, determining whether a loader module exists in the target hardware corresponding to the compiler and generating a determination result includes: determining the target hardware corresponding to the compiler; and determining whether the loader module exists in the target hardware.
[0013] Optionally, determining the writing method of the compiler based on the determination result includes: if the determination result indicates that the loader module exists in the target hardware, determining the writing method to send the compiler to the loader module so that the loader module writes the compiler to a test area, the test area being the area in the target hardware where the compiler is executed; if the determination result indicates that the loader module does not exist in the target hardware, determining the writing method to send the compiler to the programmer corresponding to the target hardware so that the programmer writes the compiler to the target hardware.
[0014] Optionally, after receiving the test results, the method further includes: generating feedback information; sending the feedback information to the programmer or the loader module, so that the programmer erases the compiler in the target hardware, or the loader module erases the compiler in the test area.
[0015] According to another aspect of the present invention, a testing apparatus for embedded hardware is also provided, comprising a first receiving unit, a first writing unit, and a second receiving unit, wherein the first receiving unit is used to receive a compiler, the compiler being obtained by a server compiling a test program for target hardware; the first writing unit is used to write the compiler into the corresponding target hardware, the target hardware being hardware capable of running the compiler; and the second receiving unit is used to receive test results, the test results being obtained by the target hardware running the compiler.
[0016] According to another aspect of the present invention, a testing apparatus for embedded hardware is also provided, comprising a third receiving unit, a first determining unit, a second determining unit, a second writing unit, and a fourth receiving unit, wherein the third receiving unit is used to receive a compiler, the compiler being obtained by a server compiling a test program for target hardware, and the target hardware being hardware capable of running the compiler; the first determining unit is used to determine whether a loader module exists in the target hardware corresponding to the compiler, and generate a determining result; the second determining unit is used to determine the writing method of the compiler based on the determining result; the second writing unit is used to write the compiler into the target hardware according to the writing method; and the fourth receiving unit is used to receive test results, the test results being obtained by the target hardware running the compiler.
[0017] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program is used to perform any of the methods described.
[0018] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, performs any of the methods described.
[0019] According to another aspect of the present invention, a hardware testing platform is also provided, including multiple hardware components, a server, and a computer, wherein the server is configured to receive a test program for the hardware and compile the test program to obtain a compiled program; the computer includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include methods for performing any of the methods described.
[0020] The embedded hardware testing method of this application, employing the technical solution of this application, firstly receives a compiler, which is obtained by a server compiling a test program for the target hardware; then, writes the compiler into the corresponding target hardware; finally, receives test results, which are obtained by the target hardware running the compiler. Compared with the problem of low automation in the testing of embedded hardware structures in the prior art, the embedded hardware testing method of this application, by receiving the compiled compiler, automatically writing the compiler into the corresponding target hardware, and finally receiving the test results, ensures that the testing process can be completed automatically. This solves the problem in the prior art that technicians need to manually compile the test program and burn it into the corresponding hardware structure to test the hardware structure, resulting in low automation and wasted manpower. Attached Figure Description
[0021] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0022] Figure 1 A flowchart illustrating a testing method for embedded hardware according to an embodiment of this application is shown.
[0023] Figure 2 A flowchart illustrating a testing method for embedded hardware according to another embodiment of this application is shown.
[0024] Figure 3 A schematic diagram of a testing apparatus for embedded hardware according to an embodiment of this application is shown;
[0025] Figure 4 A schematic diagram of a test apparatus for embedded hardware according to another embodiment of this application is shown. Detailed Implementation
[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element may be directly on the other element, or there may be an intermediate element present. Furthermore, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element, or "connected" to the other element via a third element.
[0030] As mentioned in the background section, the existing embedded hardware architecture has a low degree of automation in testing. To address this issue, in a typical embodiment of this application, a method, apparatus, computer-readable storage medium, processor, and hardware testing platform for testing embedded hardware are provided.
[0031] According to an embodiment of this application, a testing method for embedded hardware is provided, which can be applied to a computer.
[0032] Figure 1 This is a flowchart of a testing method for embedded hardware according to an embodiment of this application. Figure 1 As shown, the method includes the following steps:
[0033] Step S101: Receive the compiler, which is a test program for the target hardware compiled by the server.
[0034] Step S102: Write the above-mentioned compiler into the corresponding target hardware, wherein the target hardware is hardware capable of running the above-mentioned compiler.
[0035] Step S103: Receive the test results, which are obtained by running the above-mentioned compiler on the target hardware.
[0036] In the aforementioned embedded hardware testing method, firstly, a compiler is received, which is a test program for the target hardware compiled by a server; then, the compiler is written into the corresponding target hardware; finally, test results are received, which are obtained by running the compiler on the target hardware. Compared with the problem of low automation in the testing of embedded hardware structures in the prior art, the embedded hardware testing method of this application, by receiving the compiled compiler, automatically writing the compiler into the corresponding target hardware, and finally receiving the test results, ensures that the testing process can be completed automatically. This solves the problem in the prior art that technicians need to manually compile the test program and burn it into the corresponding hardware structure to test the hardware structure, resulting in low automation and wasted manpower.
[0037] In one specific embodiment, after receiving the above test results, the method further includes: displaying the above test results on a display interface for the user's convenience, and / or generating a test report from the above test results and sending it to the terminal, including sending it to the user via email, mobile phone messages, or other channels, to ensure that the user can receive the above test results in a timely manner.
[0038] Specifically, the aforementioned compiler is a binary firmware. The compilation of the aforementioned test program can be performed using the Bazel automated build tool. Of course, it is not limited to using Bazel to compile the aforementioned test program into a compiler; those skilled in the art can choose any feasible method from the existing technology according to actual needs.
[0039] In practical applications, those skilled in the art can send the programmed test program to the server, which can then automatically compile the test program into a computer-recognizable compiled program and send it to the computer.
[0040] According to a specific embodiment of this application, writing the compiler into the corresponding target hardware includes: determining the target hardware corresponding to the compiler; and writing the compiler into the target hardware. By confirming and writing the compiler into the target hardware, the smooth completion of the testing process is further ensured, the test results are automatically obtained, and the automation level of the program is further guaranteed.
[0041] In practical applications, due to different hardware providers, the corresponding hardware programming methods are also different. In this case, in order to further realize automated testing of different types of hardware structures and further ensure that the above testing process can be completed automatically, according to another specific embodiment of this application, writing the above-mentioned compiler into the above-mentioned target hardware includes: determining the programmer corresponding to the above-mentioned target hardware; sending the above-mentioned compiler to the above-mentioned programmer so that the above-mentioned programmer writes the above-mentioned compiler into the above-mentioned target hardware.
[0042] According to another specific embodiment of this application, after receiving the test results, the method further includes: generating first feedback information and sending it to the programmer, so that the programmer erases the compiler in the target hardware. Erasing the compiler in the target hardware after receiving the test results facilitates the writing of the compiler during the next test.
[0043] In a specific embodiment of this application, where a loader module exists in the target hardware, the target hardware includes a loader module. Writing the compiled program into the target hardware includes: sending the compiled program to the loader module, so that the loader module writes the compiled program into a test area, where the test area is the area on the target hardware where the compiled program is executed. Directly sending the compiled program to the loader module, and then the loader module writing the compiled program into the test area, further automates testing of different types of hardware structures, ensuring that the testing process can be completed automatically.
[0044] In one specific embodiment, the Loader module is used to detect computer hardware information and then load the compiler into the specified physical memory.
[0045] According to another specific embodiment of this application, after receiving the test results, the method further includes: generating second feedback information and sending it to the loader module, so that the loader module erases the compiler in the test area. Erasing the compiler in the test area by the loader module after receiving the test results facilitates the writing of the compiler into the test area during the next test.
[0046] According to another typical embodiment of this application, a testing method for embedded hardware is provided, which can be applied to a computer.
[0047] Figure 2 This is a flowchart of a testing method for embedded hardware according to an embodiment of this application. Figure 2As shown, the method includes the following steps:
[0048] Step S201: Receive the compiler, which is a test program for the target hardware compiled by the server, and the target hardware is hardware that can run the compiler.
[0049] Step S202: Determine whether a loader module exists in the target hardware corresponding to the above compiler, and generate a determination result;
[0050] Step S203: Based on the above determination results, determine the writing method of the above compiler;
[0051] Step S204: Write the above-described compiler into the target hardware according to the above-described writing method;
[0052] Step S205: Receive the test results, which are obtained by running the above-mentioned compiler on the target hardware.
[0053] In the aforementioned embedded hardware testing method, firstly, a compiler is received, which is obtained by the server compiling a test program for the target hardware; then, it is determined whether a loader module exists in the target hardware corresponding to the compiler, and a determination result is generated; next, based on the determination result, the writing method of the compiler is determined; then, the compiler is written into the target hardware according to the writing method; finally, the test result is received, which is obtained by the target hardware running the compiler. Compared with the problem of low automation in the testing of embedded hardware structures in the prior art, the embedded hardware testing method of this application, by receiving the compiled compiler, selecting the corresponding writing method based on the determination result of whether the target hardware has the loader module, and automatically writing the compiler into the corresponding target hardware according to the writing method, and finally receiving the test result, ensures that the compiler can be automatically written according to whether the hardware structure has a loader module. This ensures that the above testing process can be automatically completed for different types of hardware structures, solving the problem that in the prior art, technicians need to manually compile the test program and burn it into the corresponding hardware structure to test the hardware structure, resulting in low automation and wasted manpower.
[0054] In one specific embodiment, after receiving the above test results, the method further includes: displaying the above test results on a display interface for the user's convenience, and / or generating a test report from the above test results and sending it to the terminal, including sending it to the user via email, mobile phone messages, or other channels, to ensure that the user can receive the above test results in a timely manner.
[0055] Specifically, the aforementioned compiler is a binary firmware. The compilation of the aforementioned test program can be performed using the Bazel automated build tool. Of course, it is not limited to using Bazel to compile the aforementioned test program into a compiler; those skilled in the art can choose any feasible method from the existing technology according to actual needs.
[0056] In practical applications, those skilled in the art can send the programmed test program to the server, which can then automatically compile the test program into a computer-recognizable compiled program and send it to the computer.
[0057] According to a specific embodiment of this application, determining whether a loader module exists in the target hardware corresponding to the compiler and generating a determination result includes: determining the target hardware corresponding to the compiler; and determining whether the target hardware contains the loader module. By finding the target hardware corresponding to the compiler and then confirming whether the target hardware contains the loader module, automated testing of different types of hardware structures is further achieved, further ensuring that the testing process can be completed automatically.
[0058] In practical applications, due to different hardware providers, the corresponding hardware programming methods also differ. In this case, to further automate the testing of different types of hardware and ensure that the above testing process can be completed automatically, according to another specific embodiment of this application, based on the above determination result, the writing method of the compiler is determined, including: if the above determination result indicates that the loader module exists in the target hardware, the writing method is determined to be sending the compiler to the loader module so that the loader module writes the compiler into the test area, where the test area is the area where the target hardware executes the compiler; if the above determination result indicates that the loader module does not exist in the target hardware, the writing method is determined to send the compiler to the programmer corresponding to the target hardware so that the programmer writes the compiler into the target hardware. If the loader module is present in the target hardware, the compiler is directly sent to the loader module, which then writes the compiler into the test area of the target hardware. If the loader module is not present in the target hardware, the compiler is sent to the programmer, which then writes the compiler into the target hardware. This further enables automated testing of different types of hardware structures and ensures that the testing process can be completed automatically.
[0059] According to another specific embodiment of this application, after receiving the test results, the method further includes: generating feedback information; sending the feedback information to the programmer or the loader module, so that the programmer erases the compiler in the target hardware, or the loader module erases the compiler in the test area. Erasing the compiler from the target hardware or the test area by the programmer or the loader module facilitates the writing of the compiler during the next test.
[0060] In one specific embodiment, the Loader module is used to detect computer hardware information and then load the compiler into the specified physical memory.
[0061] This application also provides a testing apparatus for embedded hardware, which is applied to a computer. It should be noted that the embedded hardware testing apparatus of this application can be used to execute the testing methods for embedded hardware provided in this application. The embedded hardware testing apparatus provided in this application will be described below.
[0062] Figure 3 This is a schematic diagram of a testing apparatus for embedded hardware according to an embodiment of this application. Figure 3 As shown, the device includes a first receiving unit 10, a first writing unit 20, and a second receiving unit 30. The first receiving unit 10 is used to receive a compiler, which is a test program for the target hardware compiled by the server. The first writing unit 20 is used to write the compiler into the corresponding target hardware, which is hardware capable of running the compiler. The second receiving unit 30 is used to receive test results, which are obtained by the target hardware running the compiler.
[0063] In the aforementioned embedded hardware testing device, the first receiving unit receives a compiler, which is a test program for the target hardware compiled by a server; the first writing unit writes the compiler into the corresponding target hardware; and the second receiving unit receives test results, which are obtained by running the compiler on the target hardware. Compared to the low level of automation in the testing of embedded hardware structures in the prior art, the embedded hardware testing device of this application automatically completes the testing process by receiving the compiled compiler, automatically writing the compiler into the corresponding target hardware, and finally receiving the test results. This solves the problem in the prior art where technicians need to manually compile the test program and burn it into the corresponding hardware structure for testing, resulting in low automation and wasted manpower.
[0064] In one specific embodiment, after receiving the above test results, the method further includes: displaying the above test results on a display interface for the user's convenience, and / or generating a test report from the above test results and sending it to the terminal, including sending it to the user via email, mobile phone messages, or other channels, to ensure that the user can receive the above test results in a timely manner.
[0065] Specifically, the aforementioned compiler is a binary firmware. The compilation of the aforementioned test program can be performed using the Bazel automated build tool. Of course, it is not limited to using Bazel to compile the aforementioned test program into a compiler; those skilled in the art can choose any feasible method from the existing technology according to actual needs.
[0066] In practical applications, those skilled in the art can send the programmed test program to the server, which can then automatically compile the test program into a computer-recognizable compiled program and send it to the computer.
[0067] According to a specific embodiment of this application, the first writing unit includes a first determining module and a writing module, wherein the first determining module is used to determine the target hardware corresponding to the compiler; and the writing module is used to write the compiler into the target hardware. By confirming the target hardware corresponding to the compiler and writing it, the smooth completion of the testing process is further ensured, the test results are automatically obtained, and the automation level of the program is further guaranteed.
[0068] In practical applications, due to different hardware providers, the corresponding hardware programming methods also differ. In this case, in order to further achieve automated testing of different types of hardware structures and further ensure that the above testing process can be completed automatically, according to another specific embodiment of this application, the writing module includes a determining submodule and a first writing submodule, wherein the determining submodule is used to determine the programmer corresponding to the target hardware; the first writing submodule is used to send the compiled program to the programmer so that the programmer writes the compiled program into the target hardware.
[0069] According to another specific embodiment of this application, the above-mentioned device further includes a first erasure unit, which is used to generate first feedback information and send it to the programmer after receiving the test result, so that the programmer erases the compiler in the target hardware. Erasing the compiler in the target hardware by the programmer after receiving the test result facilitates the writing of the compiler in the next test.
[0070] In a specific embodiment of this application, where a loader module exists in the target hardware, the target hardware includes a loader module, and the writing module further includes a second writing submodule. The second writing submodule is used to send the compiled program to the loader module, so that the loader module writes the compiled program into a test area, which is the area where the target hardware executes the compiled program. By directly sending the compiled program to the loader module, and then the loader module writing the compiled program into the test area, automated testing of different types of hardware structures is further achieved, ensuring that the testing process can be completed automatically.
[0071] In one specific embodiment, the Loader module is used to detect computer hardware information and then load the compiler into the specified physical memory.
[0072] According to another specific embodiment of this application, the above-mentioned apparatus further includes a second erasure unit, which is used to generate second feedback information and send it to the loader module after receiving the test result, so that the loader module erases the compiler in the test area. After receiving the test result, erasing the compiler in the test area by the loader module facilitates the writing of the compiler into the test area during the next test.
[0073] This application also provides an embedded hardware testing apparatus, which is applied to a computer. It should be noted that the embedded hardware testing apparatus of this application can be used to execute the embedded hardware testing method provided in this application. The embedded hardware testing apparatus provided in this application will be described below.
[0074] Figure 4 This is a schematic diagram of a testing apparatus for embedded hardware according to an embodiment of this application. Figure 4As shown, the device includes a third receiving unit 40, a first determining unit 50, a second determining unit 60, a second writing unit 70, and a fourth receiving unit 80. The third receiving unit 40 receives a compiler, which is obtained by compiling a test program for target hardware by a server. The target hardware is hardware capable of running the compiler. The first determining unit 50 determines whether a loader module exists in the target hardware corresponding to the compiler and generates a determination result. The second determining unit 60 determines the writing method of the compiler based on the determination result. The second writing unit 70 writes the compiler into the target hardware according to the writing method. The fourth receiving unit 80 receives test results obtained by running the compiler on the target hardware.
[0075] In the aforementioned embedded hardware testing device, the third receiving unit receives a compiler, which is obtained by the server compiling a test program for the target hardware; the first determining unit determines whether a loader module exists in the target hardware corresponding to the compiler and generates a determination result; the second determining unit determines the writing method of the compiler based on the determination result; the second writing unit writes the compiler into the target hardware according to the writing method; and the fourth receiving unit receives test results, which are obtained by the target hardware running the compiler. Compared to the low level of automation in the testing of embedded hardware structures in existing technologies, the embedded hardware testing device of this application receives the compiled program, selects the corresponding writing method based on the determination of whether the target hardware has the loader module, and automatically writes the compiled program into the corresponding target hardware according to the writing method. Finally, it receives the test results. This ensures that the compiled program can be automatically written according to whether the hardware structure has a loader module. It ensures that the above testing process can be completed automatically for different types of hardware structures. This solves the problem that in existing technologies, technicians need to manually compile the test program and burn it into the corresponding hardware structure to test the hardware structure, which results in low automation and wasted manpower.
[0076] In one specific embodiment, after receiving the above test results, the method further includes: displaying the above test results on a display interface for the user's convenience, and / or generating a test report from the above test results and sending it to the terminal, including sending it to the user via email, mobile phone messages, or other channels, to ensure that the user can receive the above test results in a timely manner.
[0077] Specifically, the aforementioned compiler is a binary firmware. The compilation of the aforementioned test program can be performed using the Bazel automated build tool. Of course, it is not limited to using Bazel to compile the aforementioned test program into a compiler; those skilled in the art can choose any feasible method from the existing technology according to actual needs.
[0078] In practical applications, those skilled in the art can send the programmed test program to the server, which can then automatically compile the test program into a computer-recognizable compiled program and send it to the computer.
[0079] According to a specific embodiment of this application, the first determining unit includes a second determining module and a third determining module, wherein the second determining module is used to determine the target hardware corresponding to the compiler; and the third determining module is used to determine whether the target hardware contains the loader module. By finding the target hardware corresponding to the compiler and then confirming whether the target hardware contains the loader module, automated testing of different types of hardware structures is further achieved, further ensuring that the testing process can be completed automatically.
[0080] In practical applications, due to different hardware providers, the corresponding hardware programming methods also differ. In this case, to further achieve automated testing of different types of hardware structures and to further ensure that the above testing process can be completed automatically, according to another specific embodiment of this application, the second determining unit includes a fourth determining module and a fifth determining module. The fourth determining module is used to determine, if the determination result is that the loader module exists in the target hardware, that the writing method is to send the compiler to the loader module so that the loader module writes the compiler into the test area, where the test area is the area where the target hardware executes the compiler. The fifth determining module is used to determine, if the determination result is that the loader module does not exist in the target hardware, that the writing method is to send the compiler to the programmer corresponding to the target hardware so that the programmer writes the compiler into the target hardware. If the loader module is present in the target hardware, the compiler is directly sent to the loader module, which then writes the compiler into the test area of the target hardware. If the loader module is not present in the target hardware, the compiler is sent to the programmer, which then writes the compiler into the target hardware. This further enables automated testing of different types of hardware structures and ensures that the testing process can be completed automatically.
[0081] According to another specific embodiment of this application, the above-mentioned apparatus further includes a generation unit and a third erasure unit, wherein the generation unit is used to generate feedback information after receiving the test result; the third erasure unit is used to send the feedback information to the programmer or the loader module, so that the programmer erases the compiler in the target hardware, or the loader module erases the compiler in the test area. Erasing the compiler in the target hardware or the test area by the programmer or the loader module facilitates the writing of the compiler during the next test.
[0082] In one specific embodiment, the Loader module is used to detect computer hardware information and then load the compiler into the specified physical memory.
[0083] The aforementioned embedded hardware testing device includes a processor and a memory. The first receiving unit, the first writing unit, the second receiving unit, the third receiving unit, the first determining unit, the second determining unit, the second writing unit, and the fourth receiving unit are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to implement the corresponding functions.
[0084] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the low level of testing automation in existing embedded hardware architectures.
[0085] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0086] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the aforementioned test method for embedded hardware.
[0087] This invention provides a processor for running a program, wherein the program executes the testing method for the embedded hardware.
[0088] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:
[0089] Step S101: Receive the compiler, which is a test program for the target hardware compiled by the server.
[0090] Step S102: Write the above-mentioned compiler into the corresponding target hardware, wherein the target hardware is hardware capable of running the above-mentioned compiler.
[0091] Step S103: Receive the test results, which are obtained by running the above-mentioned compiler on the target hardware.
[0092] Alternatively, the processor may execute the following steps when executing the program:
[0093] Step S201: Receive the compiler, which is a test program for the target hardware compiled by the server, and the target hardware is hardware that can run the compiler.
[0094] Step S202: Determine whether a loader module exists in the target hardware corresponding to the above compiler, and generate a determination result;
[0095] Step S203: Based on the above determination results, determine the writing method of the above compiler;
[0096] Step S204: Write the above-described compiler into the target hardware according to the above-described writing method;
[0097] Step S205: Receive the test results, which are obtained by running the above-mentioned compiler on the target hardware.
[0098] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0099] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:
[0100] Step S101: Receive the compiler, which is a test program for the target hardware compiled by the server.
[0101] Step S102: Write the above-mentioned compiler into the corresponding target hardware, wherein the target hardware is hardware capable of running the above-mentioned compiler.
[0102] Step S103: Receive the test results, which are obtained by running the above-mentioned compiler on the target hardware.
[0103] Or a program that performs initialization with at least the following steps:
[0104] Step S201: Receive the compiler, which is a test program for the target hardware compiled by the server, and the target hardware is hardware that can run the compiler.
[0105] Step S202: Determine whether a loader module exists in the target hardware corresponding to the above compiler, and generate a determination result;
[0106] Step S203: Based on the above determination results, determine the writing method of the above compiler;
[0107] Step S204: Write the above-described compiler into the target hardware according to the above-described writing method;
[0108] Step S205: Receive the test results, which are obtained by running the above-mentioned compiler on the target hardware.
[0109] According to another typical embodiment of this application, a processor is also provided, which is used to run a program, wherein the program executes any of the methods described above when it runs.
[0110] According to another typical embodiment of this application, a hardware testing platform is also provided, including multiple hardware components, a server, and a computer. The server is used to receive a test program from the hardware and compile the test program to obtain a compiled program. The computer includes one or more processors, a memory, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs include methods for performing any of the above-described methods.
[0111] The aforementioned hardware testing platform includes multiple hardware components, a server, and a computer. The server receives the test program for the hardware and compiles it to obtain a compiled program. The computer includes one or more processors, a memory, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the one or more processors. Each of the one or more programs includes methods for performing any of the aforementioned methods. Compared to the low level of automation in the testing of embedded hardware structures in existing technologies, the hardware testing platform of this application automatically completes the testing process by receiving the compiled program, automatically writing it into the corresponding target hardware, and finally receiving the test results. This solves the problem in existing technologies where technicians need to manually compile the test program and burn it into the corresponding hardware structure for testing, resulting in low automation and wasted manpower.
[0112] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0113] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units described above can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0114] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0115] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0116] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0117] As can be seen from the above description, the embodiments of this application achieve the following technical effects:
[0118] 1) In the embedded hardware testing method of this application, firstly, a compiler is received, which is obtained by the server compiling a test program for the target hardware; then, the compiler is written into the corresponding target hardware; finally, the test result is received, which is obtained by the target hardware running the compiler. Compared with the problem of low automation in the testing of embedded hardware structures in the prior art, the embedded hardware testing method of this application, by receiving the compiled compiler, automatically writing the compiler into the corresponding target hardware, and finally receiving the test result, ensures that the testing process can be completed automatically. This solves the problem in the prior art that technicians need to manually compile the test program and burn it into the corresponding hardware structure to test the hardware structure, resulting in low automation and wasted manpower.
[0119] 2) In the embedded hardware testing method of this application, firstly, a compiler is received, which is obtained by the server compiling a test program for the target hardware; then, it is determined whether a loader module exists in the target hardware corresponding to the compiler, and a determination result is generated; then, based on the determination result, the writing method of the compiler is determined; then, the compiler is written into the target hardware according to the writing method; finally, the test result is received, which is obtained by the target hardware running the compiler. Compared with the problem of low automation in the testing of embedded hardware structures in the prior art, the embedded hardware testing method of this application, by receiving the compiled compiler, selecting the corresponding writing method based on the determination result of whether the target hardware has the loader module, and automatically writing the compiler into the corresponding target hardware according to the writing method, and finally receiving the test result, ensures that the compiler can be automatically written according to whether the hardware structure has a loader module. This ensures that the above testing process can be automatically completed for different types of hardware structures, solving the problem that in the prior art, technicians need to manually compile the test program and burn it into the corresponding hardware structure to test the hardware structure, resulting in low automation and wasted manpower.
[0120] 3) In the embedded hardware testing device of this application, the first receiving unit receives a compiler, which is obtained by the server compiling a test program for the target hardware; the first writing unit writes the compiler into the corresponding target hardware; and the second receiving unit receives test results, which are obtained by the target hardware running the compiler. Compared with the problem of low automation in the testing of embedded hardware structures in the prior art, the embedded hardware testing device of this application receives the compiled compiler, automatically writes the compiler into the corresponding target hardware, and finally receives the test results. This ensures that the testing process can be completed automatically, solving the problem that in the prior art, technicians need to manually compile the test program and burn it into the corresponding hardware structure to test the hardware structure, resulting in low automation and wasted manpower.
[0121] 4) In the embedded hardware testing device of the present application, the third receiving unit receives a compiler, which is obtained by the server compiling a test program for the target hardware; the first determining unit determines whether a loader module exists in the target hardware corresponding to the compiler and generates a determining result; the second determining unit determines the writing method of the compiler based on the determining result; the second writing unit writes the compiler into the target hardware according to the writing method; and the fourth receiving unit receives test results, which are obtained by the target hardware running the compiler. Compared to the low level of automation in the testing of embedded hardware structures in existing technologies, the embedded hardware testing device of this application receives the compiled program, selects the corresponding writing method based on the determination of whether the target hardware has the loader module, and automatically writes the compiled program into the corresponding target hardware according to the writing method. Finally, it receives the test results. This ensures that the compiled program can be automatically written according to whether the hardware structure has a loader module. It ensures that the above testing process can be completed automatically for different types of hardware structures. This solves the problem that in existing technologies, technicians need to manually compile the test program and burn it into the corresponding hardware structure to test the hardware structure, which results in low automation and wasted manpower.
[0122] 5) The hardware testing platform described in this application includes multiple hardware components, a server, and a computer. The server receives the test program from the hardware and compiles it to obtain a compiled program. The computer includes one or more processors, a memory, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs include methods for performing any of the aforementioned methods. Compared to the low level of automation in the testing of embedded hardware structures in the prior art, the hardware testing platform of this application automatically completes the testing process by receiving the compiled program, automatically writing the compiled program into the corresponding target hardware, and finally receiving the test results. This solves the problem in the prior art where technicians need to manually compile the test program and burn it into the corresponding hardware structure for testing, resulting in low automation and wasted manpower.
[0123] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method of testing embedded hardware, characterized by, The method comprises: receiving a compiled program, the compiled program being obtained by compiling a test program of a target hardware by a server; writing the compiled program into the corresponding target hardware, the target hardware being hardware capable of running the compiled program; receiving a test result, the test result being obtained by running the compiled program by the target hardware; writing the compiled program into the corresponding target hardware, comprising: determining the target hardware corresponding to the compiled program; writing the compiled program into the target hardware; the compiled program being a binary firmware, and the test program being compiled by a bazel automated build tool; displaying the test result on a display interface to facilitate user viewing, and / or generating a test report of the test result and sending the test report to a terminal, the target hardware comprising a loader module, and writing the compiled program into the target hardware comprising: sending the compiled program to the loader module to enable the loader module to write the compiled program into a test area, the test area being an area of the target hardware for executing the compiled program, or, in the case that the target hardware does not comprise a loader module, sending the compiled program to a programmer corresponding to the target hardware to enable the programmer to write the compiled program into the target hardware.
2. The method of claim 1, wherein, writing the compiled program into the target hardware, comprising: determining a programmer corresponding to the target hardware; sending the compiled program to the programmer to enable the programmer to write the compiled program into the target hardware.
3. The method of claim 2, wherein, After receiving the test result, the method further comprises: generating first feedback information and sending the first feedback information to the programmer to enable the programmer to erase the compiled program in the target hardware.
4. The method of claim 1, wherein, After receiving the test result, the method further comprises: generating second feedback information and sending the second feedback information to the loader module to enable the loader module to erase the compiled program in the test area.
5. A method of testing embedded hardware, characterized by, The method comprises: receiving a compiled program, the compiled program being obtained by compiling a test program of a target hardware by a server, the target hardware being hardware capable of running the compiled program; determining whether a loader module exists in the target hardware corresponding to the compiled program, and generating a determination result; determining a writing mode of the compiled program according to the determination result; writing the compiled program into the target hardware in the writing mode; receiving a test result, the test result being obtained by running the compiled program by the target hardware; determining whether a loader module exists in the target hardware corresponding to the compiled program, and generating a determination result, comprising: determining the target hardware corresponding to the compiled program; determining whether the loader module exists in the target hardware; the compiled program being a binary firmware, and the test program being compiled by a bazel automated build tool; displaying the test result on a display interface to facilitate user viewing, and / or generating a test report of the test result and sending the test report to a terminal, The method further comprises, after receiving the test result:
6. The method of claim 5, wherein, generating feedback information; sending the feedback information to the programmer or the loader module, so that the programmer erases the compiled program in the target hardware, or so that the loader module erases the compiled program in the test area. The method further comprises:
7. A test apparatus for embedded hardware, characterized by receiving a compiled program, the compiled program being obtained by compiling a test program of a target hardware by a server; writing the compiled program into the corresponding target hardware, the target hardware being hardware capable of running the compiled program; receiving a test result, the test result being obtained by running the compiled program by the target hardware; The first writing unit comprises a first determination module and a writing module, wherein the first determination module is configured to determine the target hardware corresponding to the compiled program; the writing module is configured to write the compiled program into the target hardware, the compiled program being a binary firmware, and the test program being compiled by a bazel automated build tool; the apparatus is further configured to display the test result on a display interface to facilitate user viewing, and / or to send a test report generated based on the test result to a terminal; The target hardware comprises a loader module, and the writing module further comprises a second writing submodule, which is configured to send the compiled program to the loader module, so that the loader module writes the compiled program into a test area, the test area being an area in which the target hardware executes the compiled program, or, in the case where the target hardware does not comprise a loader module, to send the compiled program to a programmer corresponding to the target hardware, so that the programmer writes the compiled program into the target hardware. The method further comprises:
8. A test apparatus for embedded hardware, characterized by receiving a compiled program, the compiled program being obtained by compiling a test program of a target hardware by a server; determining whether a loader module exists in the target hardware corresponding to the compiled program, and generating a determination result; determining a writing mode of the compiled program according to the determination result; a second writing unit, configured to write the compiled program into the target hardware according to the writing mode; a fourth receiving unit, configured to receive a test result, the test result being obtained by running the compiled program on the target hardware, the second determining unit comprises a fourth determining module and a fifth determining module, wherein the fourth determining module is configured to determine that the writing mode is to send the compiled program to the loader module, so that the loader module writes the compiled program into a test region, which is a region for executing the compiled program on the target hardware, when the determination result is that the loader module exists in the target hardware; the fifth determining module is configured to determine that the writing mode is to send the compiled program to a programmer corresponding to the target hardware, so that the programmer writes the compiled program into the target hardware, when the determination result is that the loader module does not exist in the target hardware.
9. A computer-readable storage medium, characterized in that, the computer readable storage medium comprises a stored program, wherein the program executes the method in any one of claims 1 to 4 or the method in claim 5 or 6.
10. A processor, comprising: the processor is configured to run a program, wherein the program executes the method in any one of claims 1 to 4 or the method in claim 5 or 6 when running.
11. A hardware testing platform, characterized by comprise: a plurality of hardware; a server, configured to receive a test program of the hardware and compile the test program to obtain a compiled program; a computer comprising one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs comprise a program for executing the method in any one of claims 1 to 4 or the method in claim 5 or 6.
Citation Information
Patent Citations
ARM-based non-intrusive detection device and method for running state of household appliance
CN111338262A
Embedded system testing method, system, device and equipment and storage medium
CN113157508A