CN115576571A - PC OS system installation checking method, system, computer device and storage medium - Google Patents

PC OS system installation checking method, system, computer device and storage medium Download PDF

Info

Publication number
CN115576571A
CN115576571A CN202211255264.2A CN202211255264A CN115576571A CN 115576571 A CN115576571 A CN 115576571A CN 202211255264 A CN202211255264 A CN 202211255264A CN 115576571 A CN115576571 A CN 115576571A
Authority
CN
China
Prior art keywords
comparison
information
configuration file
esp
standard configuration
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
Application number
CN202211255264.2A
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211255264.2A priority Critical patent/CN115576571A/en
Publication of CN115576571A publication Critical patent/CN115576571A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of PC (personal computer) production, in particular to a method and a system for installing and checking a PC OS (operating system) system, computer equipment and a storage medium. The method comprises the steps of judging the installation position of an OS system, and obtaining a drive letter to call and execute a shell script; acquiring a standard configuration file, acquiring ESP topological information of a PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the comparison is consistent, checking is passed, and if the comparison is not passed, error information fail is printed; and acquiring the hard disk partition size information of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the hard disk partition size information of the PC to be checked, if the comparison is consistent, passing the check, and if the comparison is not passed, printing error reporting information fail. The invention saves the time cost and the labor cost waste caused by the complicated process of manual repeated confirmation after the system is installed; the intelligent level of a factory is improved; the efficiency of installing the system and surveying the workshop section after having improved.

Description

Method and system for checking installation of PC OS system, computer device and storage medium
Technical Field
The invention relates to the technical field of PC (personal computer) production, in particular to a method and a system for installing and checking an OS (operating system) system of a PC, computer equipment and a storage medium.
Background
In the production process of a PC factory, because the mirror images are selected and the hard disks are installed manually, the error selection is easy, and for a machine with multiple disks matched, a system disk with the wrong installation cannot be identified, the customer complaint is easy to generate, whether the installation system of a machine station is complete or not needs to be confirmed, the manual inspection and judgment of production line staff are difficult, the inspection of the OS system disk receives the feedback of a customer at present, the position of the installation system disk is different from that of the machine with an order, the customer inquires the position, and if the condition is excessive, the customer complaint can be caused on the contrary. In order to solve the technical problem, a method, a system, a computer device and a storage medium for checking the installation of the OS system of the PC are provided.
Disclosure of Invention
In order to solve the technical problems in the prior art, the invention provides a method, a system, computer equipment and a storage medium for installing and checking a PC OS system, wherein the C language code a.c realizes the determination of a preinstalled system disk symbol required by a PC according to rules; py realizes 100% byte content comparison of ESP topological information and 100% byte content comparison of partition size; the system realizes 100% automation and intelligent comparison of domestic PC OS system installation inspection.
In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
in a first aspect, in one embodiment, the present invention provides a method for checking system installation of a PC OS, the method including the steps of:
judging the installation position of an OS system, and acquiring a drive letter to call an execution shell script;
acquiring a standard configuration file, acquiring ESP topological information of a PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the comparison is consistent, checking is passed, and if the comparison is not passed, error information fail is printed;
and acquiring the size information of the hard disk partition of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the size information of the hard disk partition of the PC to be checked, if the standard configuration file is consistent with the size information of the hard disk partition, checking if the standard configuration file is consistent with the size information of the hard disk partition, and if the standard configuration file is not consistent with the size information of the hard disk partition of the PC to be checked, printing error reporting information fail.
As a further scheme of the invention, the installation position of the OS system is judged, the drive letter is obtained, and the execution shell script is called, wherein the priority obtaining of the preinstalled drive letter needed by the PC to be checked is obtained, the drive letter of the installation system needed by the PC to be checked is confirmed, and the drive letter is transmitted to the execution shell script for other identification processing.
As a further aspect of the present invention, the determining the OS system installation location is implemented by a.sh.
As a further scheme of the present invention, the method for obtaining the ESP topology information of the PC to be checked, comparing the standard configuration file with the ESP topology information of the PC to be checked, if the standard configuration file is consistent with the ESP topology information, the ESP topology information passes the check, and if the standard configuration file fails, the error information fail is printed, and the method includes: opening and reading contents of a standard configuration file and ESP topological information of a PC to be checked by an open and read method in python, comparing all bytes of the obtained contents one by one, entering the next stage when the obtained contents are completely the same, and otherwise, printing error reporting information FAIL.
As a further scheme of the present invention, the obtaining of the hard disk partition size information of the PC to be inspected through ESP topology information comparison, and comparing the standard configuration file with the hard disk partition size information of the PC to be inspected, if the comparison is consistent, the inspection is passed, and if the comparison is not passed, the printing of the error reporting information fail includes opening and reading the content of the standard configuration file and the hard disk partition size information of the PC to be inspected by using an open and read method in python, comparing all bytes of the obtained content one by one, and if the comparison is completely the same, checking the PASS of the PC.
As a further aspect of the present invention, the ESP topology information comparison and the hard disk partition size information comparison of the inspection PC are implemented by a b.py script.
In a second aspect, in another embodiment provided by the present invention, there is provided a PC OS system install check system, comprising: the device comprises a mounting position judging module and a comparing module;
the installation position judgment module is specifically used for acquiring the priority of preinstalled disk drive symbols required by the PC to be checked, confirming the disk drive symbols of the installation system required by the PC to be checked, and transmitting the disk drive symbols to the execution shell script for other identification processing;
the comparison module is used for acquiring a standard configuration file, acquiring ESP topological information of the PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the standard configuration file is consistent with the ESP topological information, the comparison is passed, and if the standard configuration file is not consistent with the ESP topological information, error reporting information fail is printed; the method is used for obtaining the hard disk partition size information of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the hard disk partition size information of the PC to be checked, if the comparison is consistent, the check is passed, and if the comparison is not passed, the error reporting information fail is printed.
In a third aspect, in yet another embodiment provided by the present invention, there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the PC OS system installation checking method when the computer program is loaded and executed.
In a fourth aspect, in a further embodiment provided by the present invention, there is provided a storage medium storing a computer program which is loaded by a processor and which, when executed, performs the steps of the PC OS system installation checking method.
The technical scheme provided by the invention has the following beneficial effects:
the installation inspection method, the system, the computer equipment and the storage medium of the PC OS system realize automatic disk selection and installation in a domestic PC installation stage, and avoid manual selection of a wrong hard disk installation system; time cost and labor cost waste caused by a complicated process of manual repeated confirmation after the system is installed are saved; the intelligent level of a factory is improved; the efficiency of the installation system and the post-measurement workshop section is improved; the straight-through rate of a production line is improved, and unnecessary labor waste is reduced; the consistency and the correctness of the order system are ensured, and customer complaints are reduced or avoided.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a flow chart of a PC OS system installation checking method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating the display status of nvme hard disks in C language according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating the display status of the nvme hard disk in the C language according to an embodiment of the present invention;
FIG. 4 is a block diagram of the configuration of a PC OS system installation check system in accordance with one embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
In the figure: the device comprises a mounting position judging module-100, a comparison module-200, a processor-301, a communication interface-302, a memory-303 and a communication bus-304.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The flowcharts shown in the figures are illustrative only and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Specifically, the embodiments of the present invention are further explained below with reference to the drawings.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for checking the installation of a PC OS system according to an embodiment of the present invention, and as shown in fig. 1, the method for checking the installation of a PC OS system includes steps S10 to S30.
S10, judging the installation position of the OS system, and acquiring a drive letter to call and execute a shell script;
in the embodiment of the present invention, the step S10 of determining the OS system installation location, acquiring the drive letter, and calling the execution shell script, includes acquiring the priority of the preinstalled drive letter required by the PC to be checked, determining the drive letter of the installation system required by the PC to be checked, and transmitting the drive letter to the execution shell script for other identification processing.
In the embodiment of the present invention, the determining the OS system installation location is implemented by a.sh.
And S20, acquiring a standard configuration file, acquiring ESP topological information of the PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the standard configuration file is consistent with the ESP topological information, checking if the standard configuration file is consistent with the ESP topological information, and printing error-reporting information fail if the standard configuration file is not consistent with the ESP topological information.
In an embodiment of the present invention, the obtaining the standard configuration file includes determining whether the standard configuration file already exists in a host path of the test server, and if not, copying installos1.Conf to a 'cp/inst/installos 1.Conf/log/Config/{ }/installos1.Conf' format of the test server, so that the server hard disk is configured as the standard configuration file.
Specifically, the method obtains ESP topology information of the PC to be inspected, compares the standard configuration file with the ESP topology information of the PC to be inspected, passes inspection if the comparison is consistent, and prints error information fail if the comparison fails, and includes: opening and reading contents of a standard configuration file and ESP topological information of a PC to be checked by an open and read method in python, comparing all bytes of the obtained contents one by one, entering the next stage when the obtained contents are completely the same, and otherwise, printing error reporting information FAIL.
And S30, acquiring the size information of the hard disk partition of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the size information of the hard disk partition of the PC to be checked, if the comparison is consistent, the check is passed, and if the comparison is not passed, error information fail is printed.
In the embodiment of the invention, the obtaining of the hard disk partition size information of the to-be-inspected PC compared with the ESP topology information, the comparing of the standard configuration file with the hard disk partition size information of the to-be-inspected PC, the passing of the inspection if the comparison is consistent, and the printing of the error information fail if the comparison is not passed, includes opening and reading the content of the standard configuration file and the hard disk partition size information of the to-be-inspected PC by using an open and read method in python, comparing all bytes of the obtained content one by one, and inspecting the PC PASS if the comparison is completely identical.
The comparison of ESP topological information and hard disk partition size information of the PC is realized through b.py scripts.
Illustratively, in order to achieve the installation checking function of the OS system of the PC, the present invention writes a test executable file a.exe based on C: its function is to execute the bin file a.exe during the test. Firstly, the installation sequence of a PC system is defined as nvme > SSD > HDD according to a function system (lsblk-d-o name, rota); obtaining a return result, and storing the return result in a structure struct test _ info { char a [3] [3], char b [1] [1] }; (the char [3] [3] is set because there are at most three hard disks in the PC at present and is modified as required), after the result is obtained, if (test _ info. A [1] [3] = "nvme0n1" | test _ info. A [2] [3] = "nvme0n1" | a [3] [3] = "nvme0n 1") is judged, then system ("sh/home/b.sh" nvme0n1 ") is executed to transmit the nvme parameter to the next step script b.sh, which is the case where there is an nvme hard disk, for example, as shown in fig. 2, the nvme hard disk is the hard disk with the highest PC system installation priority; if the if result is not as shown in fig. 3, if the if statement result is 0, then there is no nvme hard disk, then the else establishes for loop for (i =1 i is constructed from 4 i + +); packaging the disk character name corresponding to the rota =0 into an array do _ string, and executing system (do _ string) in the code; operating the command line to execute the do _ string statement and executing the script b.sh in the command line, for example: sh/home/b. The process finishes the priority acquisition of the preinstalled drive letter needed by the PC, confirms the drive letter of the installation system needed by the PC to be checked, and transmits the drive letter to the b.py script for other identification processing. The implementation of C language is only done here, and other languages can be used.
Py, the first phase principle of which is: putting an lsblk-F >/insp/blk.txt (displaying ESP and outputting topological information) execution result into a local text file blk.txt, reading a device disk character lsscsi-t | grep usb | awk ' { print $ NF } ' | awk-F '/' { print $ NF } ', deleting the content of the U disk character in the blk.txt text file sed as sed-i '/' "" { },/d '/insp/blk.txt, deleting the content of a suspension point in the blk.txt text file, wherein each register storage position of the suspension point is different, and comparing awk ' { = NF ""; generating a primary alignment file installos1.Conf after deleting print $0} '/inst/blk.txt >/inst/installos 1.Conf, then judging whether a PC primary alignment file installos1.Conf configuration file if not (order number) exists under a server host path or not ('/1 og/Config/{ }/installos1.Conf '. Format), if not, copying the installos1.Conf file to ' cp/inst/installos 1.Conf/log/Config/{ }/installos1.Conf '. Format (order number) under a test server host, and configuring a machine hard disk as a reference for alignment; if the initial comparison configuration file exists, comparing the content of the configuration file generated by the machine with the content of an initial reference file, opening and reading the contents of the two files by using an open and read method in python, comparing all bytes of the obtained contents one by one, if the contents are completely the same, checking the PASS of the PC to enter the next stage, and otherwise, printing error reporting information FAIL.
The second stage of the method is that lsblk >/insp/blk.txt (showing the SIZE of each partition SIZE) execution result is overwritten into the local text file blk.txt, and the device disk character lssci-t | grep usb | awk '{ print $ NF }' '| awk-F'/'{ print $ NF }' of the U disk is read. awk' { $ NF = ""; generating a primary alignment file installos2.Conf after deleting print $0} '/inst/blk.txt >/inst/installos 2.Conf, then judging whether a PC primary alignment file installos2.Conf configuration file if not (order number) exists under a server host path or not ('/1 og/Config/{ }/installos2.Conf '. Format), if not, copying the installos2.Conf file to ' cp/inst/installos 2.Conf/log/Config/{ }/installos2.Conf '. Format (order number) under a test server host, and configuring the hard disk as a reference for alignment; if the first comparison configuration file exists, comparing the content of the configuration file generated by the machine with the content of a first reference file, opening and reading the contents of the two files by using an open and read method in python, comparing all bytes of the obtained contents one by one, checking the PASS of the PC if the contents are completely identical, finishing the whole test process and printing success information; otherwise, printing error information FAIL.
The code logic of the two stages is basically the same, but the comparison effect is different, the first stage mainly aims at comparing the ESP topology information, and the second stage mainly aims at comparing the size of each partition to one.
The C language code a.c of the invention realizes the determination of the preinstalled system disk symbol required by the PC according to the rule; py realizes 100% byte content comparison of ESP topological information and 100% byte content comparison of partition size; the system realizes 100% automation and intelligent comparison of domestic PC OS system installation inspection.
The solution provided by the present invention does not rely on several listed programming languages, with many scripting languages to implement the stated functions; the C language + Python is used, but one implementation manner used in the patent is only, and other programming languages can also be used for implementation. A user only needs to compare the drive letter, the partition and the size of each machine one by one in the production process of the domestic PC, and the automatic testing method can be completely used for replacement without manual inspection.
It should be understood that although the above steps are described in a certain order, these steps are not necessarily performed in the order described. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, some steps of the present embodiment may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or in turns with other steps or at least a part of the steps or stages in other steps.
In one embodiment, referring to fig. 4, a PC OS system installation checking system is further provided in an embodiment of the present invention, and the system includes an installation location determining module 100 and a comparing module 200.
The installation position determination module 100 is configured to determine an installation position of the OS system, and obtain a drive letter to call and execute the shell script.
In the embodiment of the present invention, the installation position determining module 100 is specifically configured to obtain a priority of preinstalled drive letters required by the PC to be checked, confirm the drive letters of the installation system required by the PC to be checked, and transmit the drive letters to the execution shell script for performing other identification processing.
In the embodiment of the present invention, the determining the OS system installation location is implemented by a.sh.
The comparison module 200 is used for acquiring a standard configuration file, acquiring ESP topological information of the PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the comparison is consistent, the comparison is passed, and if the comparison is not passed, error reporting information fail is printed;
the method is used for obtaining the hard disk partition size information of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the hard disk partition size information of the PC to be checked, if the comparison is consistent, the check is passed, and if the comparison is not passed, the error reporting information fail is printed.
The standard configuration file obtaining comprises judging whether the standard configuration file exists in a path of a test server host, if not, copying installos1.Conf to the test host 'cp/insp/installos1.Conf/log/Config/{ }/installos1.Conf'.
Specifically, the method obtains ESP topology information of the PC to be inspected, compares the standard configuration file with the ESP topology information of the PC to be inspected, passes inspection if the comparison is consistent, and prints error information fail if the comparison fails, and includes: opening and reading contents of a standard configuration file and ESP topological information of a PC to be checked by an open and read method in python, comparing all bytes of the obtained contents one by one, and if the obtained contents are completely the same, entering the next stage by the PASS to be checked, otherwise, printing error reporting information FAIL.
In the embodiment of the invention, the obtaining of the hard disk partition size information of the to-be-inspected PC compared with the ESP topology information, the comparing of the standard configuration file with the hard disk partition size information of the to-be-inspected PC, the passing of the inspection if the comparison is consistent, and the printing of the error information fail if the comparison is not passed, includes opening and reading the content of the standard configuration file and the hard disk partition size information of the to-be-inspected PC by using an open and read method in python, comparing all bytes of the obtained content one by one, and inspecting the PC PASS if the comparison is completely identical.
In one embodiment, referring to fig. 5, in an embodiment of the present invention, there is further provided a computer device, including a processor 301, a communication interface 302, a memory 303, and a communication bus 304, where the processor 301, the communication interface 302, and the memory 303 complete communication with each other through the communication bus 304.
A memory 303 for storing a computer program;
the processor 301 is configured to execute the method for checking the OS system installation of the PC when executing the computer program stored in the memory 303, and when executing the instructions, the processor implements the steps in the above method embodiment:
s10, judging the installation position of the OS system, and acquiring a drive letter to call and execute a shell script;
in the embodiment of the present invention, the step S10 of determining the installation location of the OS system, acquiring the drive letter, and calling the execution shell script, includes acquiring the priority of preinstalled drive letters required by the PC to be checked, determining the drive letter of the installation system required by the PC to be checked, and transmitting the drive letter to the execution shell script for other identification processing.
In the embodiment of the present invention, the determining the OS system installation location is implemented by a.sh.
And S20, acquiring a standard configuration file, acquiring ESP topological information of the PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the comparison is consistent, the check is passed, and if the comparison is not passed, error information fail is printed.
In an embodiment of the present invention, the obtaining the standard configuration file includes determining whether the standard configuration file already exists in a host path of the test server, and if not, copying installos1.Conf to a 'cp/inst/installos 1.Conf/log/Config/{ }/installos1.Conf' format of the test server, so that the server hard disk is configured as the standard configuration file.
Specifically, the method obtains ESP topology information of the PC to be inspected, compares the standard configuration file with the ESP topology information of the PC to be inspected, passes inspection if the comparison is consistent, and prints error information fail if the comparison fails, and includes: opening and reading contents of a standard configuration file and ESP topological information of a PC to be checked by an open and read method in python, comparing all bytes of the obtained contents one by one, entering the next stage when the obtained contents are completely the same, and otherwise, printing error reporting information FAIL.
And S30, acquiring the size information of the hard disk partition of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the size information of the hard disk partition of the PC to be checked, if the standard configuration file is consistent with the size information of the hard disk partition, checking if the standard configuration file passes the comparison, and printing error reporting information fail if the standard configuration file does not pass the comparison.
In the embodiment of the invention, the obtaining of the hard disk partition size information of the to-be-inspected PC compared with the ESP topology information, the comparing of the standard configuration file with the hard disk partition size information of the to-be-inspected PC, the passing of the inspection if the comparison is consistent, and the printing of the error information fail if the comparison is not passed, includes opening and reading the content of the standard configuration file and the hard disk partition size information of the to-be-inspected PC by using an open and read method in python, comparing all bytes of the obtained content one by one, and inspecting the PC PASS if the comparison is completely identical.
The comparison of the ESP topological information and the comparison of the hard disk partition size information of the PC are realized through b.py scripts.
The C language code a.c of the invention realizes the determination of the preinstalled system drive symbol required by the domestic PC according to the rule; py realizes 100% byte content comparison of ESP topological information and 100% byte content comparison of partition size; the system realizes 100% automation and intelligent comparison of the installation and inspection of the domestic PC OS system.
The solution provided by the invention does not depend on several listed programming languages, and a plurality of scripting languages for realizing the stated functions are available; the C language + Python is used, but one implementation method used in the patent is only, and other programming languages can be used for implementation. A user only needs to compare the drive letter, the partition and the size of each machine one by one in the production process of the domestic PC, and the automatic testing method can be completely used for replacement without manual inspection.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The computer equipment comprises user equipment and network equipment. Wherein the user equipment includes but is not limited to computers, smart phones, PDAs, etc.; the network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of computers or network servers, wherein Cloud Computing is one of distributed Computing, a super virtual computer consisting of a collection of loosely coupled computers. Wherein the computer device can be operated alone to implement the invention, or can be accessed to a network and implement the invention through interoperation with other computer devices in the network. The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a VPN network, and the like.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
In an embodiment of the present invention, there is also provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the above-described method embodiment:
s10, judging the installation position of the OS system, and acquiring a drive letter to call and execute a shell script;
in the embodiment of the present invention, the step S10 of determining the OS system installation location, acquiring the drive letter, and calling the execution shell script, includes acquiring the priority of the preinstalled drive letter required by the PC to be checked, determining the drive letter of the installation system required by the PC to be checked, and transmitting the drive letter to the execution shell script for other identification processing.
In the embodiment of the present invention, the determining the OS system installation location is implemented by a.sh.
And S20, acquiring a standard configuration file, acquiring ESP topological information of the PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the standard configuration file is consistent with the ESP topological information, checking if the standard configuration file is consistent with the ESP topological information, and printing error-reporting information fail if the standard configuration file is not consistent with the ESP topological information.
In an embodiment of the present invention, the obtaining the standard configuration file includes determining whether the standard configuration file already exists in a path of the test server host, and if not, copying installos1.Conf to the test host 'cp/insp/installos1.Conf/log/Config/{ }/installos1.Conf'. Format, so that the server hard disk is configured as the standard configuration file.
Specifically, the method includes the steps of acquiring ESP topology information of a PC to be checked, comparing a standard configuration file with the ESP topology information of the PC to be checked, checking if the comparison is consistent, and printing error-reporting information fail if the comparison is not consistent, and the method includes the following steps: opening and reading contents of a standard configuration file and ESP topological information of a PC to be checked by an open and read method in python, comparing all bytes of the obtained contents one by one, and if the obtained contents are completely the same, entering the next stage by the PASS to be checked, otherwise, printing error reporting information FAIL.
And S30, acquiring the size information of the hard disk partition of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the size information of the hard disk partition of the PC to be checked, if the comparison is consistent, the check is passed, and if the comparison is not passed, error information fail is printed.
In the embodiment of the invention, the obtaining of the hard disk partition size information of the to-be-inspected PC compared with the ESP topology information, the comparing of the standard configuration file with the hard disk partition size information of the to-be-inspected PC, the passing of the inspection if the comparison is consistent, and the printing of the error information fail if the comparison is not passed, includes opening and reading the content of the standard configuration file and the hard disk partition size information of the to-be-inspected PC by using an open and read method in python, comparing all bytes of the obtained content one by one, and inspecting the PC PASS if the comparison is completely identical.
The comparison of the ESP topological information and the comparison of the hard disk partition size information of the PC are realized through b.py scripts.
The C language code a.c of the invention realizes the determination of the preinstalled system disk symbol required by the domestic PC according to the rule; py realizes 100% byte content comparison of ESP topological information and 100% byte content comparison of partition size; the system realizes 100% automation and intelligent comparison of the installation and inspection of the domestic PC OS system.
The solution provided by the present invention does not rely on several listed programming languages, with many scripting languages to implement the stated functions; the C language + Python is used, but one implementation method used in the patent is only, and other programming languages can be used for implementation. A user only needs to compare the drive letter, the partition and the size of each machine one by one in the production process of the domestic PC, and the automatic testing method can be completely used for replacement without manual inspection.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
The foregoing are exemplary embodiments of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.

Claims (10)

1. A PC OS system installation checking method is characterized by comprising the following steps: judging the installation position of an OS system, and acquiring a drive letter to call an execution shell script;
acquiring a standard configuration file, acquiring ESP topological information of a PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the comparison is consistent, checking is passed, and if the comparison is not passed, error information fail is printed;
and acquiring the hard disk partition size information of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the hard disk partition size information of the PC to be checked, if the comparison is consistent, passing the check, and if the comparison is not passed, printing error reporting information fail.
2. The method for installing and checking the OS system of the PC according to claim 1, wherein the installation position of the OS system is determined, the obtained drive letter calls the execution shell script, and the method comprises the steps of obtaining the priority of the pre-installed drive letter needed by the PC to be checked, confirming the drive letter of the installation system needed by the PC to be checked, and transmitting the drive letter to the execution shell script for identification.
3. The PC OS system installation checking method of claim 1, wherein the determining of the OS system installation location is performed by a.sh.
4. The method as claimed in claim 1, wherein the obtaining the standard configuration file comprises determining whether the standard configuration file exists in a path of the test server host, and if not, copying installos1.Conf to the test host 'cp/insp/installos1.Conf/log/Config/{ }/installos1.Conf'. Format, so as to configure the server hard disk as the standard configuration file.
5. The installation and inspection method of the PC OS system according to claim 1, wherein the ESP topology information of the PC to be inspected is obtained, the standard configuration file is compared with the ESP topology information of the PC to be inspected, if the comparison is consistent, the inspection is passed, and if the comparison is not passed, the error information fail is printed, comprising: opening and reading contents of a standard configuration file and ESP topological information of a PC to be checked by an open and read method in python, comparing all bytes of the obtained contents one by one, and if the obtained contents are completely the same, entering the next stage by the PASS to be checked, otherwise, printing error reporting information FAIL.
6. The installation and inspection method of the PC OS system according to any of claims 1-5, wherein the obtaining of the size information of the hard disk partition of the PC to be inspected by ESP topology information comparison, comparing the standard configuration file with the size information of the hard disk partition of the PC to be inspected, if the comparison is consistent, the inspection is passed, and if the comparison is not passed, the printing of the error information fail is performed, including opening and reading the content of the standard configuration file and the size information of the hard disk partition of the PC to be inspected by using open and read methods in python, comparing all bytes of the obtained content one by one, and if the comparison is completely the same, the PC PASS is to be inspected.
7. The PC OS system installation checking method of claim 1, wherein the ESP topology information comparison and hard disk partition size information comparison of the checking PC are implemented by a b.py script.
8. A PC OS system installation checking system, comprising: the device comprises a mounting position judging module and a comparing module;
the installation position judgment module is used for acquiring the priority of preinstalled disk symbols required by the PC to be inspected, confirming the disk symbols of the installation system required by the PC to be inspected, and transmitting the disk symbols to the execution shell script for other identification processing;
the comparison module is used for acquiring a standard configuration file, acquiring ESP topological information of the PC to be checked, comparing the standard configuration file with the ESP topological information of the PC to be checked, if the standard configuration file is consistent with the ESP topological information, the comparison is passed, and if the standard configuration file is not consistent with the ESP topological information, error reporting information fail is printed; the method is used for obtaining the hard disk partition size information of the PC to be checked through ESP topological information comparison, comparing the standard configuration file with the hard disk partition size information of the PC to be checked, if the comparison is consistent, the check is passed, and if the comparison is not passed, the error reporting information fail is printed.
9. A computer device comprising a memory storing a computer program and a processor implementing the steps of the PC OS system installation checking method of any one of claims 1-7 when the computer program is loaded and executed.
10. A storage medium storing a computer program which is loaded by a processor and which when executed carries out the steps of the PC OS system installation checking method of any one of claims 1 to 7.
CN202211255264.2A 2022-10-13 2022-10-13 PC OS system installation checking method, system, computer device and storage medium Pending CN115576571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211255264.2A CN115576571A (en) 2022-10-13 2022-10-13 PC OS system installation checking method, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211255264.2A CN115576571A (en) 2022-10-13 2022-10-13 PC OS system installation checking method, system, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN115576571A true CN115576571A (en) 2023-01-06

Family

ID=84585066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211255264.2A Pending CN115576571A (en) 2022-10-13 2022-10-13 PC OS system installation checking method, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN115576571A (en)

Similar Documents

Publication Publication Date Title
US8572437B2 (en) Multi-platform test automation enhancement
CN107526676B (en) Cross-system test method and device
CN108923997B (en) Cloud service node automatic testing method and device based on python
CN112241360A (en) Test case generation method, device, equipment and storage medium
WO2017017691A1 (en) Testing computing devices
CN109144525A (en) A kind of software installation method and system of network self-adapting
US10824541B1 (en) System and method for test data fabrication
CN112817853A (en) Automatic test method, system and electronic equipment
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN116166525A (en) Method and device for generating test script
CN110928796A (en) Automatic change test platform
CN110688305A (en) Test environment synchronization method, device, medium and electronic equipment
CN112988578A (en) Automatic testing method and device
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN113468058B (en) Regression testing method and device for software as service platform and electronic equipment
CN115576571A (en) PC OS system installation checking method, system, computer device and storage medium
CN115599683A (en) Automatic testing method, device, equipment and storage medium
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN114003250A (en) Software deployment method and device
CN113377648A (en) Software system diagnosis method and device, electronic equipment and computer readable medium
CN113238940A (en) Interface test result comparison method, device, equipment and storage medium
CN112380118A (en) Unit testing method, unit testing device, medium and electronic 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