CN117785700A - Method and system for testing third-party component of real-time operating system - Google Patents
Method and system for testing third-party component of real-time operating system Download PDFInfo
- Publication number
- CN117785700A CN117785700A CN202311834612.6A CN202311834612A CN117785700A CN 117785700 A CN117785700 A CN 117785700A CN 202311834612 A CN202311834612 A CN 202311834612A CN 117785700 A CN117785700 A CN 117785700A
- Authority
- CN
- China
- Prior art keywords
- party component
- testing
- compiling
- rtos
- file
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 title claims abstract description 16
- 238000001514 detection method Methods 0.000 claims description 4
- 238000007689 inspection Methods 0.000 claims description 4
- 230000007246 mechanism Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
The method for testing the third-party component of the real-time operating system comprises the steps of preparing tools and environments required by testing, loading the third-party component into an engineering file by using a scons tool, compiling an RTOS program for starting the third-party component by using the scons tool, determining whether compiling is successful or not according to the running return value of the scons tool, and the like.
Description
Technical Field
The invention relates to the field of embedded operating systems, in particular to a method and a system for testing a third party component of a real-time operating system.
Background
In the field of embedded systems and internet of things (IoT), real-time operating systems (RTOSs) are widely used in a variety of devices and applications. RTOS can be used to speed up the software development cycle through the plug and play of third party components, these component libraries provide various modules including peripheral drivers, tools, etc.
Currently, most RTOS platforms have some underlying management and testing mechanisms. However, these mechanisms typically cover only the core functionality and officially supported components, and test support for third party component libraries that contribute to the community is often inadequate.
When the RTOS kernel file is updated or changed, some existing third party components may have compiling errors or running problems, but few tools can automatically detect the problems. Furthermore, certain software packages may be available only in specific hardware architectures or board-level support packages (bsp), which results in compilation or operation failures that may occur in other environments.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method and a system for testing a third party component of a real-time operating system.
The invention is realized by the following technical scheme.
The invention provides a method for testing a third party component of a real-time operating system, which comprises the following steps:
s1, preparing tools and environments required by testing, wherein the tools required by testing comprise an RTOS kernel file, an engineering file, a compiling tool and a board level support package, and the RTOS kernel file comprises an RTOS kernel version;
s2, loading the third party component into an engineering file by using a scons tool;
s3, compiling an RTOS program for enabling the third party component by using the scons tool, and determining whether compiling is successful or not according to the running return value of the scons tool;
s4, checking the result of the S3, and if compiling fails, searching a text file, wherein the text file is used for storing a compiling log output by the scons tool.
Further, the engineering file is created according to the used board level support package; the compilation tool type is also determined based on the board-level support packages used.
Further, a method of loading a third party component into an engineering file using a scons tool includes setting the third party component for testing and its version in a configuration file of an RTOS, and loading the third party component into the engineering file according to the configuration file.
Further, determining whether the compiling is successful according to the running return value of the scons tool comprises judging whether the return value is 0, and if so, indicating that the compiling is successful; if not, the compiling is failed.
Further, the kernel version, the board level support package and the version of the third party component of the RTOS can be freely set according to actual needs.
The test system of the real-time operating system third party component comprises an RTOS, a configuration module, a detection module, a compiling module, a log module and an inspection module, wherein the configuration module is electrically connected with the detection module, the compiling module, the log module and the inspection module in sequence, and the RTOS is electrically connected with the modules.
Further, the RTOS comprises an RTOS kernel file, a plurality of board-level support packages and a third party component library, wherein the third party component library comprises a plurality of third party components
The invention has the beneficial effects that: the testing method for the third party component of the RTOS allows a user to specify the kernel version of the RTOS, the board level support package (bsp) and the version of the third party component for testing, so that compatibility under a specific version environment is ensured, and higher testing flexibility is provided.
Drawings
FIG. 1 is a process flow of the present invention;
FIG. 2 is a system and flow diagram of the present invention;
FIG. 3 is a flow chart of a third party component library test in accordance with an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further described below, but the scope of the claimed invention is not limited to the above.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
In the embodiment, an RT-Thread operating system and related components thereof are selected as test objects, and an RT-Thread operating system kernel file to be tested is firstly obtained from an official source and stored in a preset catalog;
the model of the selection board level support bag (bsp) is as follows: stm32f407zgt as a test object, and creates an engineering file stm32f407-rt-spark using the corresponding board level support package (bsp) model according to the board level support package (bsp), and simultaneously downloads a corresponding compiling tool chain gcc-arm-none-eabi;
setting and starting a third party component to be tested and a version thereof in a configuration file of the RT-Thread operating system, wherein the third party component selected for the test is (information such as component name, version number and the like), and loading the third party component into an engineering file of the RT-Thread operating system by using a scons tool according to the configuration file;
compiling the prepared RT-Thread operating system program by using a scons tool, and determining whether the compiling is successful or not according to the running return value of the scons tool; if the return value is 0, the compiling is successful, and the compiling log output by the scons tool is saved so as to facilitate the subsequent problem positioning; further, in order to ensure the function and stability of the selected third party component, the embodiment adds testing to the third party component library storing the third party component, and the specific testing method is as follows:
the timing task is set to test all components in the third party component library in the appointed time interval by using the method in the appointed RT-Thread operating system kernel version RT-Thread4.1.1, master and the appointed bsp-stm32f407zgt, and after the test is finished, the system automatically generates and issues a detailed test result report which contains each component and the corresponding version compiling condition.
Step 2: and (3) continuously monitoring index changes of the third party component library, automatically triggering the testing of the changed components once the components are detected to be updated or newly added, updating the testing result into the report issued in the step (1) after the testing is finished, and providing feedback for relevant component maintainers.
Step 3: when the RTOS has a new version to release, the new version is added into the timing task in the step 1, and all components in the third party component library are triggered to be tested, and a test result report is updated.
Step 4: monitoring the change of the kernel file of the RTOS, and testing some key or appointed third-party components on the changed RTOS kernel when the change of the kernel is detected to evaluate the influence of the kernel change on the components, wherein the evaluation method is to determine the rationality of the change of the kernel file according to the compiling condition of the components related to the change file, and synchronously updating the components in turn.
The above embodiments are preferred embodiments of the present invention, and it should be noted that any obvious substitution and minor variation are within the scope of the present invention without departing from the concept of the present invention.
Claims (7)
1. The method for testing the third party component of the real-time operating system is characterized by comprising the following steps of:
s1, preparing tools and environments required by testing, wherein the tools required by testing comprise an RTOS kernel file, an engineering file, a compiling tool and a board level support package, and the RTOS kernel file comprises an RTOS kernel version;
s2, loading the third party component into an engineering file by using a scons tool;
s3, compiling an RTOS program for enabling the third party component by using the scons tool, and determining whether compiling is successful or not according to the running return value of the scons tool;
s4, checking the result of the S3, and if compiling fails, searching a text file, wherein the text file is used for storing a compiling log output by the scons tool.
2. The method for testing a third party component of a real time operating system of claim 1, wherein: the engineering file is created according to the used board level support package; the compilation tool type is also determined based on the board-level support packages used.
3. The method for testing a third party component of a real time operating system of claim 1, wherein: the method for loading the third party component into the engineering file by using the scons tool comprises setting the third party component for testing and the version thereof in a configuration file of the RTOS, and loading the third party component into the engineering file according to the configuration file.
4. The method for testing a third party component of a real time operating system of claim 1, wherein: the method for determining whether the compiling is successful according to the running return value of the scons tool comprises the steps of judging whether the return value is 0, and if so, indicating that the compiling is successful; if not, the compiling is failed.
5. The method for testing a third party component of a real time operating system of claim 1, wherein: the kernel version of the RTOS, the board level support package and the version of the third party component can be freely set according to actual needs.
6. A test system for a third party component of a real-time operating system is characterized in that: the system comprises an RTOS, a configuration module, a detection module, a compiling module, a log module and an inspection module, wherein the configuration module is electrically connected with the detection module, the compiling module, the log module and the inspection module in sequence, and the RTOS is electrically connected with the modules.
7. The system for testing a real-time operating system third party component as defined in claim 6, wherein: the RTOS comprises an RTOS kernel file, a plurality of board-level support packages and a third party component library, wherein the third party component library comprises a plurality of third party components.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311834612.6A CN117785700A (en) | 2023-12-28 | 2023-12-28 | Method and system for testing third-party component of real-time operating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311834612.6A CN117785700A (en) | 2023-12-28 | 2023-12-28 | Method and system for testing third-party component of real-time operating system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117785700A true CN117785700A (en) | 2024-03-29 |
Family
ID=90397960
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311834612.6A Pending CN117785700A (en) | 2023-12-28 | 2023-12-28 | Method and system for testing third-party component of real-time operating system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117785700A (en) |
-
2023
- 2023-12-28 CN CN202311834612.6A patent/CN117785700A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7869986B2 (en) | System and method for performing processing in a testing system | |
CN105630463B (en) | For detecting the method and device of JAR packet conflict | |
CN108459962B (en) | Code normalization detection method and device, terminal equipment and storage medium | |
US8225285B2 (en) | Generating a test suite to test support for routines | |
CN107329889B (en) | Method for automatically testing C compiler | |
US9779014B2 (en) | Resilient mock object creation for unit testing | |
CN112286741A (en) | Hardware testing method and device, electronic equipment and storage medium | |
CN114996127A (en) | Intelligent test method and system for solid state disk firmware module | |
CN114924737A (en) | Battery management system source code integration test method and device and electronic equipment | |
WO2023207973A1 (en) | Compiler test method and apparatus, case generation method and apparatus, and instruction storage structure | |
CN117785700A (en) | Method and system for testing third-party component of real-time operating system | |
CN109739760B (en) | Code debugging test method and device and storage medium | |
CN109902001B (en) | Method for detecting uninitialized variable and terminal equipment | |
CN115964237A (en) | Method and device for testing functions and performance of Central Processing Unit (CPU) | |
CN112506806B (en) | Method for debugging program, electronic device and storage medium | |
CN115470141A (en) | Fault simulation method, device and related equipment | |
EP0594888A1 (en) | Method and apparatus for computer software testing | |
CN110928798A (en) | Code testing method, device and equipment | |
CN111427762A (en) | Automatic calling tool analysis techniques | |
CN111651364B (en) | SQL (structured query language) checking method and device under parallel development | |
CN112256554B (en) | Method and equipment for testing based on scene test cases | |
CN115309653A (en) | Configuration verification method, device and storage medium for industrial control software test | |
CN116010251A (en) | Method, device and equipment for acquiring csv designated ranks by using JMeter | |
Braunisch et al. | Maturity Evaluation of SDKs for I4. 0 Digital Twins | |
CN115658548A (en) | Testing method and device for data migration between multiple systems of bank |
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 |