CN112860483A - Method and device for restarting compilation control after self-recognition compilation failure - Google Patents

Method and device for restarting compilation control after self-recognition compilation failure Download PDF

Info

Publication number
CN112860483A
CN112860483A CN202110121249.8A CN202110121249A CN112860483A CN 112860483 A CN112860483 A CN 112860483A CN 202110121249 A CN202110121249 A CN 202110121249A CN 112860483 A CN112860483 A CN 112860483A
Authority
CN
China
Prior art keywords
compiling
failure
instruction
restart
compilation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110121249.8A
Other languages
Chinese (zh)
Other versions
CN112860483B (en
Inventor
葛俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhuoyi Technology Co Ltd
Original Assignee
Shanghai Zhuoyi 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 Shanghai Zhuoyi Technology Co Ltd filed Critical Shanghai Zhuoyi Technology Co Ltd
Priority to CN202110121249.8A priority Critical patent/CN112860483B/en
Publication of CN112860483A publication Critical patent/CN112860483A/en
Application granted granted Critical
Publication of CN112860483B publication Critical patent/CN112860483B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The application relates to a method and a device for restarting compilation control after self-recognition compilation failure, wherein the method comprises the steps of monitoring a compilation process in real time and acquiring a compilation Log file after Android ROM compilation is finished in real time; identifying whether Android ROM compiling fails or not based on the obtained compiling Log file; if the judgment result is yes, timely intervention is carried out, a restart compiling instruction is generated in a targeted mode according to the reason of compiling failure, and the restart compiling instruction is used for controlling the Android ROM to restart and compile.

Description

Method and device for restarting compilation control after self-recognition compilation failure
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling restart of compilation after self-recognition of a compilation failure.
Background
Android ROM development, in brief, is to customize and modify a source code of an Android system, Android ROM software needs to be compiled under a Linux system, with the improvement of an Android version, the size of the source code is gradually increased from a few G to tens of G to hundreds of G, and the time for successfully compiling general software is correspondingly increased from tens of minutes to hours.
Therefore, when Android ROM development is performed, source codes need to be compiled frequently, the compiling time needs several hours, and machines are extremely clamped in the compiling time period and cannot work normally, so that the development is basically that off-duty compiling is performed at night and the machine refreshing test is performed the next day. However, often, a compiling failure caused by abnormality of some PC machines or a compiling failure caused by insufficient PC space is encountered, and although the machine is restarted for recompiling, the PC is restarted when the compiling failure is found in the next day, and the recompiling affects the working efficiency.
Therefore, the current compiling method has the problems of low compiling efficiency and influence on working efficiency due to the fact that compiling fails and cannot be restarted.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for controlling restart after self-recognition compiling failure, which can improve compiling efficiency and work efficiency.
The technical scheme of the invention is as follows:
a method of restarting compilation control after self-identifying a compilation failure, the method comprising:
step S100: monitoring the compiling process in real time and acquiring a compiling Log file after the Android ROM compiling is finished in real time;
step S200: identifying whether Android ROM compiling fails or not based on the obtained compiling Log file;
step S300: if the compiling failure is judged to be yes, timely intervention is carried out, a restarting compiling instruction is generated in a targeted mode according to the reason of compiling failure, and the restarting compiling instruction is used for controlling the Android ROM to restart and compile.
Preferably, the step of identifying whether the Android ROM compiling fails based on the obtained compiling Log file specifically includes:
step S210: searching whether a preset failure identification key word for identifying compiling failure exists in the compiling Log file or not based on the obtained compiling Log file;
step S220: if the result is positive, the Android ROM compiling is judged to be failed.
The self-recognition compile failure restart control method of claim 2 wherein the failure identification key comprises a machine reason cause failure key,
the step of retrieving, based on the obtained compiling Log file, whether there is a preset failure identification keyword for identifying compiling failure in the compiling Log file specifically includes:
step S2111: retrieving whether a machine reason causes a failure keyword in the compiling Log file or not based on the obtained compiling Log file;
step S2112: if the result is positive, the Android ROM compiling is judged to be failed.
Preferably, the restart compilation instruction comprises a machine restart instruction and a recompile instruction;
if the compiling failure is judged to be yes, timely intervention is carried out, a compiling restarting instruction is generated in a targeted manner according to the reason of compiling failure, the compiling restarting instruction is used for controlling the Android ROM to restart and compile, and the method specifically comprises the following steps:
step S3111: if the judgment result is yes, generating the machine restarting instruction; the machine restarting instruction is used for controlling the machine loaded with the Android ROM to restart;
step S3112: and generating the recompilation instruction according to the machine restarting instruction, wherein the recompilation instruction is used for controlling the machine loaded with the Android ROM to restart the Android ROM compiling.
Preferably, the failure identification keyword includes a failure keyword caused by insufficient space,
the step of retrieving, based on the obtained compiling Log file, whether there is a preset failure identification keyword for identifying compiling failure in the compiling Log file specifically includes:
step S2121: searching whether a keyword which causes failure due to insufficient space exists in the compiling Log file or not based on the obtained compiling Log file;
step S2122: if the result is positive, the Android ROM compiling is judged to be failed.
Preferably, the restart compilation instruction comprises a compilation script re-execution instruction;
if the compiling failure is judged to be yes, timely intervention is carried out, a compiling restarting instruction is generated in a targeted manner according to the reason of compiling failure, the compiling restarting instruction is used for controlling the Android ROM to restart and compile, and the method specifically comprises the following steps:
and if so, generating a compiling script re-executing instruction, wherein the compiling script re-executing instruction is used for restarting the Android ROM compiling by a machine loaded with the Android ROM.
Preferably, there is further provided a restart compilation control apparatus after a compilation failure is recognized, the apparatus including:
the compiling file acquisition module is used for monitoring the compiling process in real time and acquiring a compiling Log file after the Android ROM compiling is finished in real time;
the first judgment module is used for identifying whether Android ROM compiling fails or not based on the obtained compiling Log file;
and the restarting compiling instruction generating module is used for timely intervening and generating a restarting compiling instruction according to the reason of compiling failure if the judging result is yes, and the restarting compiling instruction is used for controlling the Android ROM to restart and compile.
The apparatus for controlling restart compilation after self-recognition compilation failure as claimed in claim 1, wherein the first determining module further comprises:
the second judgment module is used for retrieving whether a preset failure identification key word for identifying compiling failure exists in the compiling Log file or not based on the obtained compiling Log file;
and the compiling failure judging module is used for judging that the Android ROM is compiled to fail if the judging result is positive.
Preferably, a computer device is further provided, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of restarting the compilation control method after the self-recognition compilation failure when executing the computer program.
Preferably, a computer readable storage medium is further provided, on which a computer program is stored, which when executed by a processor implements the steps of the above-mentioned restart compilation control method after self-recognition of a compilation failure.
The invention realizes the following technical effects:
according to the method and the device for controlling restart of the compiling after the self-recognition compiling failure, the compiling process is monitored in real time and a compiling Log file after the compiling of the Android ROM is finished is obtained in real time; then identifying whether the Android ROM compiling fails or not based on the obtained compiling Log file; and finally, if the judgment result is yes, timely intervention is carried out, a restart compiling instruction is generated in a targeted manner according to the reason of compiling failure, and the restart compiling instruction is used for controlling the Android ROM to restart and compile, so that whether the Android ROM is compiled to fail or not can be identified through the obtained compiling Log file after any compiling technology, namely, a judgment process is added, the restart compiling instruction is generated when the Android ROM is judged to fail or not, and the Android ROM is controlled to restart and compile through the restart compiling instruction, so that the working efficiency is greatly improved, and the flow of the current compiling work is optimized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow diagram illustrating restarting a compilation control method after self-identifying a compilation failure in one embodiment;
FIG. 2 is a block diagram illustrating an exemplary implementation of a restart compiler control apparatus after a compilation failure is identified;
FIG. 3 is a diagram of the internal structure of a computer device in one embodiment;
FIG. 4 is a schematic diagram of pseudo code in one embodiment;
FIG. 5 is a schematic diagram of pseudo code in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method for restarting compilation control after self-recognition compilation failure provided by the embodiment of the application can be applied to an application environment, the application environment comprises a terminal device, the terminal device can be a machine for bearing Android ROM compilation, and the terminal device can be connected with a machine for performing Android ROM compilation. When the terminal equipment is a machine for bearing Android ROM compilation, the terminal equipment firstly monitors the compilation process in real time and acquires a compilation Log file after the Android ROM compilation is finished in real time; then identifying whether the Android ROM compiling fails or not based on the obtained compiling Log file; and finally, if the judgment result is yes, timely intervention is carried out, a restart compiling instruction is generated in a targeted manner according to the reason of compiling failure, and the restart compiling instruction is used for controlling the Android ROM to restart and compile.
Certainly, when the terminal device is connected with a machine for performing Android ROM compilation, the terminal device monitors the compilation process in real time and obtains a compilation Log file after the Android ROM compilation is finished in real time, then identifies whether the Android ROM compilation fails based on the obtained compilation Log file, and finally intervenes in time and generates a restart compilation instruction according to the reason of the compilation failure in a targeted manner if the compilation Log file is judged to be failed, wherein the restart compilation instruction is used for controlling the Android ROM to restart and compile, the generated restart compilation instruction can be sent to the machine for performing Android ROM compilation in a wireless or wired manner by the terminal device, and then the machine for performing Android ROM compilation is controlled to restart and compile.
The terminal device may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
In one embodiment, as shown in fig. 1, there is provided a restart compilation control method after self-recognition of a compilation failure, the method comprising:
step S100: monitoring the compiling process in real time and acquiring a compiling Log file after the Android ROM compiling is finished in real time;
in the step, after the Android ROM compiling is finished, a compiling Log file is generated, and whether the Android ROM compiling is successful as a data base is judged subsequently by obtaining the compiling Log file.
Step S200: identifying whether Android ROM compiling fails or not based on the obtained compiling Log file;
specifically, in this step, whether Android ROM compilation fails is identified through the obtained compilation Log file, and compilation information recorded in the compilation Log file is fully utilized, so that whether Android ROM compilation fails is accurately identified and judged.
Step S300: if the compiling failure is judged to be yes, timely intervention is carried out, a restarting compiling instruction is generated in a targeted mode according to the reason of compiling failure, and the restarting compiling instruction is used for controlling the Android ROM to restart and compile.
In this step, if the determination is yes, that is, the determination identifies that the Android ROM compiling fails, so the Android ROM compiling needs to be restarted, so the restart compiling instruction is generated, and the Android ROM is controlled to restart the compiling based on the restart compiling instruction.
According to the self-recognition compiling failure restart compiling control method, the compiling process is monitored in real time, and a compiling Log file after the compiling of the Android ROM is finished is obtained in real time; then identifying whether the Android ROM compiling fails or not based on the obtained compiling Log file; and finally, if the judgment result is yes, timely intervention is carried out, a restart compiling instruction is generated in a targeted manner according to the reason of compiling failure, and the restart compiling instruction is used for controlling the Android ROM to restart and compile, so that whether the Android ROM is compiled to fail or not can be identified through the obtained compiling Log file after any compiling technology, namely, a judgment process is added, the restart compiling instruction is generated when the Android ROM is judged to fail or not, and the Android ROM is controlled to restart and compile through the restart compiling instruction, so that the working efficiency is greatly improved, and the flow of the current compiling work is optimized.
Furthermore, if the judgment result is yes, timely intervention is carried out, a restart compiling instruction is generated in a targeted manner according to the reason of compiling failure, the restart compiling instruction is used for controlling the Android ROM to restart compiling, so that monitoring and real-time intervention on a compiling event are achieved, the reason of failure possibly caused in the compiling process is monitored in real time, a corresponding automatic processing scheme is given out until the compiling process is successful, and the working efficiency is greatly improved.
In another embodiment of the present invention, after the timely intervening and targeted generation of the restart compilation instruction according to the reason of the compilation failure, the method further includes:
step S610: identifying and acquiring a compiling process that the restart compiling instruction cannot process compiling failure, and recording as a compiling scheme which cannot be processed;
step S620: recording the processing track which is manually repaired and cannot process the compiling scheme, and adding a successful processing label to the processing track;
step S630: and adding the processing scheme corresponding to the processing track which is added with the successfully processed label and is manually repaired and cannot process the compiling scheme into a preset compiling processing scheme library.
Specifically, the manual repair of the processing track that cannot process the compiling scheme may be specifically implemented by using the following method:
firstly, recording a debugging command in the manual processing process until debugging is successful, then establishing a debugging instruction group according to a time axis and generating a new processing scheme, wherein the new processing scheme is a processing scheme corresponding to the processing track which is manually repaired and cannot process the compiling scheme in the step S630.
And then, storing the processing scheme corresponding to the processing track which is manually repaired and cannot process the compiling scheme in a warehouse, or storing the processing scheme after manual screening in the warehouse, wherein the warehouse is the compiling processing scheme warehouse in the step S630.
Further, in another embodiment of the present invention, the debugging instruction set may perform simulation processing on the above-mentioned events for verifying validity, for example, by adding a case that copies the current compiling process when an unhandled problem is encountered during compiling, and stores the case as a case, and then the environment may be copied according to the case for the debugging instruction set to perform processing again for verification, and the case can be added into the compiling processing scheme library after passing.
In another embodiment of the present invention, the step of identifying whether Android ROM compiling fails based on the obtained compiling Log file specifically includes:
step S210: searching whether a preset failure identification key word for identifying compiling failure exists in the compiling Log file or not based on the obtained compiling Log file;
specifically, in the step, whether the compiling fails is judged through the retrieval of the keywords, so that the method is efficient, rapid, simple and convenient, and the compiling efficiency is realized.
Furthermore, failure identification keywords for identifying compiling failure are set in advance based on actual compiling conditions, and it is known through experiments of technicians in the field that keywords for identifying compiling failure will appear in the compiling Log file after compiling failure.
Step S220: if the result is positive, the Android ROM compiling is judged to be failed.
If yes, searching a failure identification keyword for identifying compiling failure in the compiling Log file based on the obtained compiling Log file, and at the moment, indicating that the current compiling fails, so that the Android ROM compiling failure is determined in the step.
In another embodiment of the invention, the failure identification keyword comprises a machine reason cause failure keyword,
the step of retrieving, based on the obtained compiling Log file, whether there is a preset failure identification keyword for identifying compiling failure in the compiling Log file specifically includes:
step S2111: retrieving whether a machine reason causes a failure keyword in the compiling Log file or not based on the obtained compiling Log file;
specifically, in this step, when a failure keyword is generated due to a machine reason, that is, it is determined that the compiling is failed due to the machine reason, in this embodiment, the failure keyword is "Jack Server".
Furthermore, after the compiling is failed, "Jack Server" appears in the compiling Log, namely a failure keyword caused by the machine reason appears, so in the step, whether the compiling is successful or failed is accurately judged in the follow-up process by searching whether the compiling Log file has the failure keyword caused by the machine reason based on the obtained compiling Log file.
Further, the code for those skilled in the art to set whether the search for the keyword that has failed due to the machine reason is found may be: log grep "Jack Server".
Of course, those skilled in the art can select other programming modes according to actual needs, and the present invention is illustrated only by way of example.
Step S2112: if the result is positive, the Android ROM compiling is judged to be failed.
Further, if the result is yes, namely that the 'JacK Server' is found through the steps, the Android ROM compiling is judged to be failed.
When the presence of "Jack Server" is retrieved, the pseudo code is as shown in figure 5,
and meanwhile, configuring the command in a Linux system-/. bashrc file, and automatically executing the command when the PC is restarted. The bashrc configuration file is also a self-contained mechanism of the linux system, and can be automatically executed after being started
In another embodiment of the invention, the restart compiled instructions include machine restart instructions and recompile instructions;
if the compiling failure is judged to be yes, timely intervention is carried out, a compiling restarting instruction is generated in a targeted manner according to the reason of compiling failure, the compiling restarting instruction is used for controlling the Android ROM to restart and compile, and the method specifically comprises the following steps:
step S3111: if the judgment result is yes, generating the machine restarting instruction; the machine restarting instruction is used for controlling the machine loaded with the Android ROM to restart;
specifically, in this step, when the determination is yes, that is, it is determined that "Jack Server" appears in the compiled Log file, it may be determined that the Android ROM is failed to compile, and the reason of the failure is a machine reason, so the machine restart instruction is generated in this step; the machine restarting instruction is used for controlling the machine carrying the Android ROM to restart, so that the compiling failure reason is overcome aiming at the compiling failure, efficient compiling is further realized, and the working efficiency is improved.
Further, when programming, a person skilled in the art can control the machine loaded with the Android ROM to restart by setting a code of "sudo reboot".
Step S3112: and generating the recompilation instruction according to the machine restarting instruction, wherein the recompilation instruction is used for controlling the machine loaded with the Android ROM to restart the Android ROM compiling.
In this step, after the machine restart instruction is generated and the machine carrying the Android ROM is controlled to restart, the failure reason of the previous compilation is overcome, so that the recompilation instruction is generated, and the machine carrying the Android ROM is controlled to restart the Android ROM compilation based on the recompilation instruction, so that the recompilation success rate is greatly improved, and the working efficiency is improved.
In another embodiment of the present invention, the failure identification keyword includes a failure-causing keyword due to insufficient space,
the step of retrieving, based on the obtained compiling Log file, whether there is a preset failure identification keyword for identifying compiling failure in the compiling Log file specifically includes:
step S2121: searching whether a keyword which causes failure due to insufficient space exists in the compiling Log file or not based on the obtained compiling Log file;
in this step, the space is insufficient, resulting in a failure keyword being "no space". That is, in this step, whether a keyword "no space" exists in the compiling Log file is retrieved based on the obtained compiling Log file. "no space" is a keyword that appears in the compiled Log file when insufficient space is present in the machine.
Step S2122: if the result is positive, the Android ROM compiling is judged to be failed.
In this step, if yes, it is determined whether there is a failure keyword due to insufficient space in the compiling Log file, that is, it is determined whether there is "no space" in the compiling Log file, and it may also be determined that the current compiling failure is a compiling failure due to insufficient space of a machine carrying the Android ROM.
In another embodiment of the present invention, the restart compilation instruction includes a compilation script re-execution instruction;
if the compiling failure is judged to be yes, timely intervention is carried out, a compiling restarting instruction is generated in a targeted manner according to the reason of compiling failure, the compiling restarting instruction is used for controlling the Android ROM to restart and compile, and the method specifically comprises the following steps:
and if so, generating a compiling script re-executing instruction, wherein the compiling script re-executing instruction is used for restarting the Android ROM compiling by a machine loaded with the Android ROM.
Specifically, in this step, if the determination is yes, that is, the Android ROM compilation is determined to be failed, and the compilation is failed due to insufficient space of the machine carrying the Android ROM, so that the compilation needs to be restarted, so that the compilation script is generated and the machine carrying the Android ROM is controlled to restart the Android ROM compilation based on the compilation script re-execution instruction, and then the compilation is restarted.
In another embodiment of the present invention, before the step of generating the compiling script re-executing instruction, the method further includes:
step S510: acquiring an intermediate generation directory compiled by an Android ROM;
in the step, the intermediate generation directory is a standard output directory compiled by a ROM, and a data support basis is provided for subsequently judging whether each directory file is useful or not by acquiring the intermediate generation directory.
Step S510: extracting an unmodified standard output catalog in a specific time period according to the generated intermediate generation catalog;
in this step, if the code compiled in the previous Android ROM compiling process is updated without fail, the code is modified while being updated, so that the standard output directory which is not modified in a specific time period is extracted according to the generated intermediate generated directory, and the directory which is not needed in the Android ROM compiling process can be obtained.
In another embodiment of the present invention, the following method can be used to extract the standard output directory that is not modified in a specific time period:
the OUT directory of the code with the older time, namely the intermediate generation directory of the ROM compilation, can be generated by traversing the time of the code directory, and after the OUT directory is cleaned, the compilation script can be directly executed for recompilation without restarting.
Those skilled in the art can be programmed to:
cat build.log | grep “no space”
further, the detailed description is as follows:
i, a person skilled in the art can define a command A as a compiling command and a command B as a log analysis command, and then can utilize a self-contained executing multi-command mechanism of the Linux system to connect 2 commands through semicolons to sequentially execute the command A; and B'. This ensures that the log analysis command is executed after the compilation command is executed.
ii, Log analysis Command pseudo code as shown in FIG. 4:
where log analysis commands can be written to the shell script for execution, those skilled in the art can define the script name as analysis.
Then the complete command is as follows:
make project new ; ./analysis.sh
therefore, log analysis work can be carried out after compiling is finished, and the method is fast and efficient.
Step S520: deleting the standard output directory which is not modified in the specific time period and generating the compiling script re-executing instruction.
Specifically, in this step, the directory which is not needed in the Android ROM compiling process is deleted by deleting the standard output directory which is not modified within the extracted specific time period, so that the space of the machine carrying the Android ROM is increased, then, the compiling script re-execution instruction is generated, and the machine carrying the Android ROM is controlled to restart the Android ROM compiling based on the generated compiling script re-execution instruction, so that the problem caused by insufficient space is solved, the compiling success rate is increased, and the working efficiency is improved.
In another embodiment of the present invention, an algorithm may be designed simply for clearing the space, i.e., removing the standard output directory that has not been modified for a particular period of time. When a plurality of sets of engineering codes are stored in the code directory, a user can search whether an out directory is modified within 5 days by traversing each set of codes according to the following command, wherein the out directory is a standard output directory compiled by a ROM, the directory is updated if the compiled codes are affirmatively, and if the out directory is not modified, the set of engineering codes which are not updated recently can be deleted.
find -name out -ctime -5
According to the searched result, the old out directory is deleted by rm-rf to obtain enough space, and then compiling is executed again.
make project new;./analysis.sh
In another embodiment of the present invention, as shown in fig. 2, there is also provided a restart compilation control apparatus after a compilation failure is identified, the apparatus including:
the compiling file acquisition module is used for monitoring the compiling process in real time and acquiring a compiling Log file after the Android ROM compiling is finished in real time;
the first judgment module is used for identifying whether Android ROM compiling fails or not based on the obtained compiling Log file;
and the restarting compiling instruction generating module is used for timely intervening and generating a restarting compiling instruction according to the reason of compiling failure if the judging result is yes, and the restarting compiling instruction is used for controlling the Android ROM to restart and compile.
Optionally, the first determining module further includes:
the second judgment module is used for retrieving whether a preset failure identification key word for identifying compiling failure exists in the compiling Log file or not based on the obtained compiling Log file;
and the compiling failure judging module is used for judging that the Android ROM is compiled to fail if the judging result is positive.
In another embodiment of the present invention, the compiling failure determining module is further configured to retrieve, based on the obtained compiling Log file, whether a keyword resulting from an organic cause in the compiling Log file fails; if the result is positive, the Android ROM compiling is judged to be failed.
In another embodiment of the present invention, the restart compiling instruction generating module is further configured to generate the machine restart instruction if the determination result is yes; the machine restarting instruction is used for controlling the machine loaded with the Android ROM to restart; and generating the recompilation instruction according to the machine restarting instruction, wherein the recompilation instruction is used for controlling the machine loaded with the Android ROM to restart the Android ROM compiling.
In another embodiment of the present invention, the compiling failure determining module is further configured to retrieve, based on the obtained compiling Log file, whether there is a keyword causing a failure due to insufficient space in the compiling Log file; if the result is positive, the Android ROM compiling is judged to be failed.
In another embodiment of the present invention, the restart compiling instruction generating module is further configured to generate the compiling script re-executing instruction if the determination result is yes, where the compiling script re-executing instruction is used to restart the Android ROM compiling of the machine equipped with the Android ROM.
In another embodiment of the present invention, the restart compiling instruction generating module is further configured to obtain an intermediate generation directory compiled by the Android ROM; extracting an unmodified standard output catalog in a specific time period according to the generated intermediate generation catalog; deleting the standard output directory which is not modified in the specific time period and generating the compiling script re-executing instruction.
In another embodiment of the present invention, as shown in fig. 3, there is further provided a computer device, including a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to implement the steps of restarting the compilation control method after the self-recognition compilation failure.
In another embodiment of the invention, the processor, when executing the computer program, implements the steps of: the method is used for monitoring the compiling process in real time and acquiring a compiling Log file after the compiling of the Android ROM is finished in real time; and if the judgment result is yes, timely intervening and generating a restart compiling instruction according to the reason of compiling failure, wherein the restart compiling instruction is used for controlling the Android ROM to restart and compile. The compiling Log file processing module is used for retrieving whether a preset failure identification key word for identifying compiling failure exists in the compiling Log file or not based on the obtained compiling Log file; and if so, judging that the Android ROM compiling fails. The compiling Log file is used for retrieving whether a failure keyword is caused by an organic device in the compiling Log file or not based on the obtained compiling Log file; if the result is positive, the Android ROM compiling is judged to be failed. If the judgment result is yes, generating the machine restarting instruction; the machine restarting instruction is used for controlling the machine loaded with the Android ROM to restart; generating the recompilation instruction according to the machine restart instruction, wherein the recompilation instruction is used for controlling the machine restart Android ROM compiling loaded with the Android ROM
In another embodiment of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored, which when executed by a processor implements the steps of the above-mentioned restart compilation control method after self-recognition of a compilation failure.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The processor is a control center of the computer device, connects various parts of the whole computer device by various interfaces and lines, executes various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory and calling data stored in the memory, thereby monitoring the computer device as a whole. Optionally, the processor may include one or more processing cores; preferably, the processor may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and data processing by operating the software programs and modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
The computer equipment also comprises a power supply for supplying power to each component, and the power supply management system realizes the functions of managing charging, discharging, power consumption management and the like. The power supply may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may further include an input unit operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for restarting compilation control after self-recognition of compilation failure, the method comprising:
monitoring the compiling process in real time, and acquiring a compiling Log file after the Android ROM compiling is finished in real time;
identifying whether Android ROM compiling fails or not based on the obtained compiling Log file;
if the compiling failure is judged to be yes, timely intervention is carried out, a restarting compiling instruction is generated in a targeted mode according to the reason of compiling failure, and the restarting compiling instruction is used for controlling the Android ROM to restart and compile.
2. The self-recognition compile failure restart control method according to claim 1, wherein the timely intervention and targeted generation of a compile restart instruction according to the reason of the compile failure, the compile restart instruction being used after the step of controlling the Android ROM restart compilation, further comprises:
step S610: identifying and acquiring a compiling process that the restart compiling instruction cannot process compiling failure, and recording as a compiling scheme which cannot be processed;
step S620: recording the processing track which is manually repaired and cannot process the compiling scheme, and adding a successful processing label to the processing track;
step S630: and adding the processing scheme corresponding to the processing track which is added with the successfully processed label and is manually repaired and cannot process the compiling scheme into a preset compiling processing scheme library.
3. The method for restarting compilation control after self-identifying a compilation failure according to claim 2, wherein the step of identifying whether Android ROM compilation has failed based on the obtained compilation Log file specifically comprises:
searching whether a preset failure identification key word for identifying compiling failure exists in the compiling Log file or not based on the obtained compiling Log file;
if the result is positive, the Android ROM compiling is judged to be failed.
4. The self-recognition compile failure restart control method of claim 2 wherein the failure identification key comprises a machine reason cause failure key,
the step of retrieving, based on the obtained compiling Log file, whether there is a preset failure identification keyword for identifying compiling failure in the compiling Log file specifically includes:
retrieving whether a machine reason causes a failure keyword in the compiling Log file or not based on the obtained compiling Log file;
if the result is positive, the Android ROM compiling is judged to be failed.
5. The self-recognition compile-after-failure restart control method of claim 3, wherein the compile-restart instruction comprises a machine-restart instruction and a recompile instruction;
if the compiling failure is judged to be yes, timely intervention is carried out, a compiling restarting instruction is generated in a targeted manner according to the reason of compiling failure, the compiling restarting instruction is used for controlling the Android ROM to restart and compile, and the method specifically comprises the following steps:
if the judgment result is yes, generating the machine restarting instruction; the machine restarting instruction is used for controlling the machine loaded with the Android ROM to restart;
and generating the recompilation instruction according to the machine restarting instruction, wherein the recompilation instruction is used for controlling the machine loaded with the Android ROM to restart the Android ROM compiling.
6. The self-recognition compile failure restart control method of claim 2 wherein the failure identification key includes a space shortage resulting failure key,
the step of retrieving, based on the obtained compiling Log file, whether there is a preset failure identification keyword for identifying compiling failure in the compiling Log file specifically includes:
searching whether a keyword which causes failure due to insufficient space exists in the compiling Log file or not based on the obtained compiling Log file;
if the result is positive, the Android ROM compiling is judged to be failed.
7. The self-recognition compilation-failed-restart control method according to claim 6, wherein the compilation restart instruction comprises a compilation script re-execution instruction;
if the compiling failure is judged to be yes, timely intervention is carried out, a compiling restarting instruction is generated in a targeted manner according to the reason of compiling failure, the compiling restarting instruction is used for controlling the Android ROM to restart and compile, and the method specifically comprises the following steps:
and if so, generating a compiling script re-executing instruction, wherein the compiling script re-executing instruction is used for restarting the Android ROM compiling by a machine loaded with the Android ROM.
8. A restart compilation control apparatus that restarts after self-recognition of a compilation failure, the apparatus comprising:
the compiling file acquisition module is used for monitoring the compiling process in real time and acquiring a compiling Log file after the Android ROM compiling is finished in real time;
the first judgment module is used for identifying whether Android ROM compiling fails or not based on the obtained compiling Log file;
and the restarting compiling instruction generating module is used for timely intervening and generating a restarting compiling instruction according to the reason of compiling failure if the judging result is yes, and the restarting compiling instruction is used for controlling the Android ROM to restart and compile.
9. The apparatus for controlling restart compilation after self-recognition compilation failure as claimed in claim 8, wherein the first determining module further comprises:
the second judgment module is used for retrieving whether a preset failure identification key word for identifying compiling failure exists in the compiling Log file or not based on the obtained compiling Log file;
and the compiling failure judging module is used for judging that the Android ROM is compiled to fail if the judging result is positive.
10. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
CN202110121249.8A 2021-01-28 2021-01-28 Method and device for restarting compiling control after self-identification compiling failure Active CN112860483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110121249.8A CN112860483B (en) 2021-01-28 2021-01-28 Method and device for restarting compiling control after self-identification compiling failure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110121249.8A CN112860483B (en) 2021-01-28 2021-01-28 Method and device for restarting compiling control after self-identification compiling failure

Publications (2)

Publication Number Publication Date
CN112860483A true CN112860483A (en) 2021-05-28
CN112860483B CN112860483B (en) 2024-03-12

Family

ID=75986466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110121249.8A Active CN112860483B (en) 2021-01-28 2021-01-28 Method and device for restarting compiling control after self-identification compiling failure

Country Status (1)

Country Link
CN (1) CN112860483B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113382049A (en) * 2021-05-31 2021-09-10 山东英信计算机技术有限公司 Management system and device of modular construction tool MBS

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546269A (en) * 2008-03-28 2009-09-30 鸿富锦精密工业(深圳)有限公司 System and method capable of executing file version updating
US20140047419A1 (en) * 2012-08-09 2014-02-13 Advanced Micro Devices, Inc. Handling Pointers in Program Code in a System that Supports Multiple Address Spaces
CN106293683A (en) * 2015-06-12 2017-01-04 小米科技有限责任公司 The Compilation Method of a kind of project and device
CN109491662A (en) * 2018-10-31 2019-03-19 珠海市筑巢科技有限公司 Code packaging method, computer installation and computer readable storage medium, code packaging system
CN109725906A (en) * 2018-12-30 2019-05-07 上海创功通讯技术有限公司 A kind of code compiling method and corresponding continuous integration system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546269A (en) * 2008-03-28 2009-09-30 鸿富锦精密工业(深圳)有限公司 System and method capable of executing file version updating
US20140047419A1 (en) * 2012-08-09 2014-02-13 Advanced Micro Devices, Inc. Handling Pointers in Program Code in a System that Supports Multiple Address Spaces
CN106293683A (en) * 2015-06-12 2017-01-04 小米科技有限责任公司 The Compilation Method of a kind of project and device
CN109491662A (en) * 2018-10-31 2019-03-19 珠海市筑巢科技有限公司 Code packaging method, computer installation and computer readable storage medium, code packaging system
CN109725906A (en) * 2018-12-30 2019-05-07 上海创功通讯技术有限公司 A kind of code compiling method and corresponding continuous integration system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113382049A (en) * 2021-05-31 2021-09-10 山东英信计算机技术有限公司 Management system and device of modular construction tool MBS
CN113382049B (en) * 2021-05-31 2022-04-19 山东英信计算机技术有限公司 Management system and device of modular construction tool MBS

Also Published As

Publication number Publication date
CN112860483B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN111382070B (en) Compatibility testing method and device, storage medium and computer equipment
CN111078568B (en) Code specification method, apparatus, computer device and storage medium
CN109542415B (en) Code merging method supporting parallel research and development of application programs and related equipment
CN101937340A (en) Method and device for dynamically updating and controlling software by using patches
CN101650653A (en) Daily constructing method and device
CN112882718B (en) Compiling processing method, device, equipment and storage medium
CN109032631A (en) Application program service packs acquisition methods, device, computer equipment and storage medium
US20050268283A1 (en) Audited builds based upon separate class dependency records
CN112860483A (en) Method and device for restarting compilation control after self-recognition compilation failure
CN113867750A (en) SOC processor software online upgrading method
CN104820610A (en) Method for updating virtual machine image in cloud environment
CN103544151A (en) Method and system for processing data in linux system
Barbour et al. A technique for just-in-time clone detection in large scale systems
CN111858119A (en) BIOS fault repairing method and related device
CN106682223B (en) Data validity detection method and device and intelligent interaction method and device
CN102455919A (en) Automatic optimization setting method for basic input output system(BIOS)
CN110532015B (en) On-orbit upgrading system for aerospace software
CN114860296A (en) Software continuous integration method, device and storage medium
CN114610516A (en) Application program repairing method and device, computer equipment and storage medium
CN114968277A (en) Method and device for generating master burning program file, computer equipment and medium
CN114430300B (en) Method, system, equipment and medium for testing wireless communication module
CN113407438B (en) Module testing method, computer device, and storage medium
CN111949278B (en) Method, system, terminal and storage medium for automatically installing MCS system
CN115599595B (en) Physical backup method based on distributed database
CN117688567A (en) Operating system kernel vulnerability patch verification system

Legal Events

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