CN112860483B - Method and device for restarting compiling control after self-identification compiling failure - Google Patents
Method and device for restarting compiling control after self-identification compiling failure Download PDFInfo
- Publication number
- CN112860483B CN112860483B CN202110121249.8A CN202110121249A CN112860483B CN 112860483 B CN112860483 B CN 112860483B CN 202110121249 A CN202110121249 A CN 202110121249A CN 112860483 B CN112860483 B CN 112860483B
- Authority
- CN
- China
- Prior art keywords
- compiling
- failure
- instruction
- restarting
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 230000008569 process Effects 0.000 claims abstract description 36
- 238000012544 monitoring process Methods 0.000 claims abstract description 7
- 238000012545 processing Methods 0.000 claims description 50
- 238000004590 computer program Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 241000282326 Felis catus Species 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000001680 brushing effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000036962 time dependent Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
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 compiling control after self-identification compiling failure, wherein the method comprises the steps of monitoring a compiling process in real time and acquiring a compiling Log file after the compiling of an Android ROM is finished in real time; identifying whether Android ROM compiling fails or not based on the obtained compiling Log file; if yes, intervention is performed in time, and a restarting compiling instruction is generated pertinently according to the reasons of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling restart after a self-identification compilation failure.
Background
In Android ROM development, simply speaking, source codes of Android systems are customized and modified, android ROM software needs to be compiled under a Linux system, and along with the improvement of Android versions, the size of the source codes is gradually increased from a few G to tens G to hundreds G, and the time for successfully compiling general software is correspondingly increased from tens minutes to hours.
Therefore, when the Android ROM is developed, source codes need to be compiled frequently, the compiling time needs to be several hours, and the machine cannot work normally in the compiling period of Chang Ka, so the development is basically compiling at night and the next day is the machine brushing test. However, some PC machines often fail to compile due to abnormality, or the PC space is insufficient to compile, and even if the machine is restarted to recompile, restarting the tape PC and recompilation thereof will affect the working efficiency the next day when the compiling failure is found.
Therefore, the existing compiling method has the problems that the compiling efficiency is low and the working efficiency is affected because the compiling failure cannot be changed again.
Disclosure of Invention
Accordingly, in order to solve the above-mentioned problems, it is necessary to provide a method and apparatus for restarting compilation control after a self-recognition compilation failure, which can improve compilation efficiency and work efficiency.
The technical scheme of the invention is as follows:
a method of restarting compilation control after a self-identifying compilation failure, the method comprising:
step S100: the compiling process is monitored in real time, and a compiling Log file after the Android ROM is compiled is obtained in real time;
step S200: identifying whether Android ROM compiling fails or not based on the obtained compiling Log file;
step S300: if yes, intervention is performed in time, and a restarting compiling instruction is generated pertinently according to the reasons of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling.
Preferably, the step of identifying whether the Android ROM compilation fails based on the obtained compiled Log file specifically includes:
step S210: searching whether a preset failure identification keyword for identifying the failure of compiling exists in the compiling Log file or not based on the obtained compiling Log file;
step S220: if yes, judging that the Android ROM compiling fails.
The method for controlling restart after self-identification compilation as claimed in claim 2, wherein the failure identification keyword includes a machine cause failure keyword,
the step of retrieving whether the compiling Log file has a preset failure identification keyword for identifying compiling failure based on the obtained compiling Log file specifically includes:
step S2111: searching whether a machine cause causes a failure keyword in the compiling Log file based on the obtained compiling Log file;
step S2112: if yes, judging that the Android ROM compiling fails.
Preferably, the recompilation instruction includes a machine recompilation instruction and a recompilation instruction;
if the judgment is yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reason of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling, and the method specifically comprises the following steps:
step S3111: if yes, generating the machine restarting instruction; the machine restarting instruction is used for controlling the machine carrying 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 carrying the Android ROM to restart the Android ROM compiling.
Preferably, the failure identification keywords include space shortage resulting failure keywords,
the step of retrieving whether the compiling Log file has a preset failure identification keyword for identifying compiling failure based on the obtained compiling Log file specifically includes:
step S2121: searching whether the compiling Log file has a keyword with failure caused by insufficient space or not based on the obtained compiling Log file;
step S2122: if yes, judging that the Android ROM compiling fails.
Preferably, the restart compiling instruction comprises a compiling script re-executing instruction;
if the judgment is yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reason of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling, and the method specifically comprises the following steps:
and if so, generating the compiling script re-execution instruction, wherein the compiling script re-execution instruction is used for restarting Android ROM compiling by a machine carrying the Android ROM.
Preferably, there is also provided a restart compilation control device after a self-recognition compilation failure, the device 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 is compiled in real time;
the first judging module is used for identifying whether the 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 pertinently generating a restarting compiling instruction according to the reason of compiling failure if the restarting compiling instruction is judged to be yes, and the restarting compiling instruction is used for controlling the Android ROM to restart compiling.
The apparatus for restarting a compilation control after a self-identification compilation failure according to claim 1, wherein the first determination module further comprises:
the second judging module is used for searching whether a preset failure identification keyword for identifying the 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 fails to compile if the judgment result is yes.
Preferably, the computer device further includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps described in the above method for restarting the compilation control after the self-identification compilation fails when executing the computer program.
Preferably, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of restarting the compilation control method after the self-identification compilation described above has failed.
The invention has the following technical effects:
according to the method and the device for restarting the compiling control after the self-identification compiling failure, the compiling process is monitored in real time, and the compiling Log file after the Android ROM compiling is finished is obtained in real time; identifying whether Android ROM compiling fails or not based on the obtained compiling Log file; and finally, if yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reasons of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling, so that after any compiling technology, whether the Android ROM is compiled to fail can be identified based on the obtained compiling Log file, namely, a judging process is increased, when judging whether the Android ROM is failed, the restarting compiling instruction is generated, and the Android ROM is controlled to restart compiling through the restarting compiling instruction, thereby greatly improving the working efficiency and optimizing the current compiling work flow.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention. In the drawings:
FIG. 1 is a flowchart illustrating a method for restarting compilation control after a self-identification compilation failure in one embodiment;
FIG. 2 is a block diagram illustrating a configuration of a device for restarting a compilation control after a failure of a self-identification compilation in one embodiment;
FIG. 3 is an internal block diagram of a computer device in one embodiment;
FIG. 4 is a schematic diagram of pseudocode in one embodiment;
FIG. 5 is a schematic diagram of pseudocode in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method for restarting the compiling control after the self-identification compiling failure can be applied to an application environment, wherein the application environment comprises a terminal device which can be a machine carrying Android ROM compiling, and the terminal device can be obtained by being connected with the machine carrying Android ROM compiling. When the terminal equipment is a machine carrying 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; identifying whether Android ROM compiling fails or not based on the obtained compiling Log file; and finally, if yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reasons of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling.
Of course, when the terminal device is connected with a machine for performing Android ROM compilation, the terminal device monitors a compilation process in real time and acquires a compiling Log file after the Android ROM compilation is finished in real time, then identifies whether the Android ROM compilation fails or not based on the acquired compiling Log file, finally intervenes in time and generates a restarting compilation instruction in a targeted manner according to the reason of the compilation failure if the Android ROM compilation fails, the restarting compilation instruction is used for controlling the Android ROM restarting compilation, the restarting compilation instruction generated by the terminal device can be sent to the machine for performing the Android ROM compilation in a wireless or wired mode, and then the machine for performing the Android ROM compilation is controlled to perform the Android ROM restarting compilation.
The terminal device may be, but 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 method for restarting compilation control after a self-identification compilation failure, the method comprising:
step S100: the compiling process is monitored in real time, and a compiling Log file after the Android ROM is compiled is obtained in real time;
in the step, after the Android ROM compilation is finished, compiling Log files are generated, and whether the Android ROM compilation is successful or not is judged to be a data basis through acquiring the compiling Log files.
Step S200: identifying whether Android ROM compiling fails or not based on the obtained compiling Log file;
specifically, in this step, whether the Android ROM compilation fails is identified through the obtained compiling Log file, and compiling information recorded in the compiling Log file is fully utilized, so that whether the Android ROM compilation fails is accurately identified and judged.
Step S300: if yes, intervention is performed in time, and a restarting compiling instruction is generated pertinently according to the reasons of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling.
In this step, if yes, it is determined that Android ROM compilation is not recognized, and therefore Android ROM compilation needs to be restarted, the restart compilation instruction is generated, and Android ROM restart compilation is controlled based on the restart compilation instruction.
According to the restarting compiling control method after the self-identification compiling failure, the compiling process is monitored in real time, and the compiling Log file after the Android ROM compiling is finished is obtained in real time; identifying whether Android ROM compiling fails or not based on the obtained compiling Log file; and finally, if yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reasons of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling, so that after any compiling technology, whether the Android ROM is compiled to fail can be identified based on the obtained compiling Log file, namely, a judging process is increased, when judging whether the Android ROM is failed, the restarting compiling instruction is generated, and the Android ROM is controlled to restart compiling through the restarting compiling instruction, thereby greatly improving the working efficiency and optimizing the current compiling work flow.
Furthermore, if yes, the method and the device intervene in time and generate the restarting compiling instruction in a targeted manner according to the reasons of compiling failure, and the restarting compiling instruction is used for controlling the Android ROM to restart compiling, so that the monitoring and real-time intervention of compiling events are realized, meanwhile, the reasons of the failure possibly caused in the compiling process are monitored in real time, and a corresponding automatic processing scheme is provided until the compiling process is successful, and further the working efficiency is greatly improved.
In another embodiment of the present invention, the method includes the steps of performing time-dependent intervention and pertinently generating a restart compiling instruction according to a cause of a compiling failure, where the restart compiling instruction is used for controlling the Android ROM to restart compiling, and further includes:
step S610: identifying and acquiring a compiling process of which the restarting compiling instruction cannot process compiling failure, and marking the compiling process as a compiling scheme which cannot be processed;
step S620: recording a processing track of the processing incapability of processing the compiling scheme by manual restoration and adding a successful processing label to the processing track;
step S630: and adding the processing scheme corresponding to the processing track of the processing incapability of processing the compiling scheme to a preset compiling processing scheme library by manual restoration after the successful processing label is added.
Specifically, the manual repair of the processing track incapable of processing the compiling scheme can be realized by adopting the following method:
firstly, by recording the debugging command in the manual processing process until the debugging is successful, then establishing a debugging instruction set according to a time axis and generating a new processing scheme, wherein the new processing scheme is the processing scheme corresponding to the processing track of the processing-incapable compiling scheme which is manually repaired in the step S630.
And then, storing the processing scheme corresponding to the processing track of the processing-incapable compiling scheme which is repaired manually, or storing the processing scheme according to manual screening and storing, wherein the library is the compiling processing scheme library in the step S630.
Further, in another embodiment of the present invention, the debug instruction set may perform simulation processing on the recorded events, for example, by adding a problem that cannot be handled when compiling, copy the current compiling process, store the current compiling process as a case, and subsequently process the debug instruction set again for verification according to the case-based environment, and then add the current compiling process to the compiling process scheme library after the current compiling process is passed.
In another embodiment of the present invention, the step of identifying whether the Android ROM compilation fails based on the obtained compiled Log file specifically includes:
step S210: searching whether a preset failure identification keyword for identifying the failure of compiling exists in the compiling Log file or not based on the obtained compiling Log file;
specifically, in the step, whether the compiling fails or not is judged through the retrieval of the keywords, so that the method is efficient, quick, simple and convenient, and the high efficiency of the compiling is realized.
Further, the failure identification keywords for identifying the compiling failure are set based on the actual compiling condition in advance, and it is known through experiments by those skilled in the art that after the compiling failure, the keywords for identifying the compiling failure will appear in the compiling Log file.
Step S220: if yes, judging that the Android ROM compiling fails.
In this step, if yes, it is that the obtained compiling Log file is searched for a failure identification keyword which is preset to identify the compiling failure in the compiling Log file, and the current compiling failure is described at this time, so that the Android ROM compiling failure is determined as described in this step.
In another embodiment of the present invention, the failure identification keyword comprises a machine cause failure keyword,
the step of retrieving whether the compiling Log file has a preset failure identification keyword for identifying compiling failure based on the obtained compiling Log file specifically includes:
step S2111: searching whether a machine cause causes a failure keyword in the compiling Log file based on the obtained compiling Log file;
specifically, in this step, when a machine cause failure keyword occurs, that is, it is determined that the machine cause causes a compilation failure, and in this embodiment, the machine cause failure keyword is "Jack Server".
Further, when compiling fails, a "Jack Server" appears in the compiling Log, that is, the machine cause causes a failure keyword appears, so in this step, whether the compiling Log file has the machine cause causes the failure keyword is searched based on the obtained compiling Log file, and whether the compiling is successful or failed is accurately judged subsequently.
Still further, the code set by the person skilled in the art to retrieve whether the machine cause occurs or not resulting in a failure keyword may be: cat build.log|grep "Jack Server".
Of course, those skilled in the art may select other programming modes according to actual needs, and the present invention is exemplified only.
Step S2112: if yes, judging that the Android ROM compiling fails.
Further, if yes, the "Jack Server" is found through the above steps, so that the Android ROM compiling is judged to be failed.
When the occurrence of "Jack Server" is retrieved, the pseudocode is as shown in figure 5,
meanwhile, the commands are well configured in a Linux system/. Basherc file, and the commands are automatically executed after the PC is restarted. The basherc configuration file is also a mechanism of the linux system, and can be automatically executed after being started
In another embodiment of the present invention, the recompilation instructions include a machine recompilation instruction and a recompilation instruction;
if the judgment is yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reason of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling, and the method specifically comprises the following steps:
step S3111: if yes, generating the machine restarting instruction; the machine restarting instruction is used for controlling the machine carrying the Android ROM to restart;
specifically, in this step, when the judgment is yes, that is, it is judged that "Jack Server" appears in the compiled Log file, it may be judged that Android ROM compilation fails, and the reason for the failure is a machine reason, so that 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 realized, and the working efficiency is improved.
Further, when programming, a person skilled in the art can control the machine carrying 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 carrying the Android ROM to restart the Android ROM compiling.
In this step, after the machine restart instruction is generated and the machine with the Android ROM is controlled to restart, the failure cause of the previous compiling is overcome, so that the recompilation instruction is generated, and the machine with the Android ROM is controlled to restart the Android ROM compiling based on the recompilation instruction, so that the success rate of recompilation is greatly improved, and the working efficiency is improved.
In another embodiment of the present invention, the failure identification keywords include space-shortage causing failure keywords,
the step of retrieving whether the compiling Log file has a preset failure identification keyword for identifying compiling failure based on the obtained compiling Log file specifically includes:
step S2121: searching whether the compiling Log file has a keyword with failure caused by insufficient space or not based on the obtained compiling Log file;
in this step, the insufficient space results in a failure keyword of "no space". That is, this step is to retrieve whether there is a keyword "no space" in the compiled Log file based on the obtained compiled Log file. "no space" is a keyword that appears in the compiled Log file when the machine appears in insufficient space.
Step S2122: if yes, judging that the Android ROM compiling fails.
In this step, if yes, in order to determine whether there is a failure keyword caused by insufficient space in the compiled Log file, that is, whether there is "no space" in the compiled Log file, it may also be determined that the current compilation failure is a compilation failure caused by insufficient space of the machine on which the Android ROM is mounted.
In another embodiment of the present invention, the restart compilation instruction includes a compilation script re-execution instruction;
if the judgment is yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reason of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling, and the method specifically comprises the following steps:
and if so, generating the compiling script re-execution instruction, wherein the compiling script re-execution instruction is used for restarting Android ROM compiling by a machine carrying the Android ROM.
Specifically, in this step, if yes, that is, if the Android ROM is not compiled, and if the Android ROM is not compiled due to insufficient space of the machine carrying the Android ROM, the compiling is restarted, so that 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 compiling script re-execution instruction, and then the compiling is restarted.
In another embodiment of the present invention, before the step of generating the compiled script re-execution instruction, the method further includes:
step S510: acquiring an Android ROM compiled intermediate generation directory;
in the step, the intermediate generation catalog is a standard output catalog compiled by the ROM, and a data support basis is provided for the subsequent judgment of whether each catalog file is useful or not by acquiring the intermediate generation catalog.
Step S510: extracting standard output catalogs which are not modified within a specific time period according to the generated intermediate generation catalogs;
in this step, if the code compiled in the previous Android ROM compiling process is updated and modified, the standard output directory which is not modified in a specific time period is extracted according to the generated intermediate generation 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 extraction of the standard output catalog unmodified in a specific time period may be performed by the following method:
the time of the code catalog can be traversed, the OUT catalog of the code with the older time, namely the intermediate generation catalog compiled by the ROM, is cleaned up, and then the compiling script is directly executed for recompilation without restarting.
Those skilled in the art can implement this by programming as follows:
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, a command B as a log analysis command, and then a Linux system can be utilized to execute a plurality of command mechanisms by itself, namely, 2 commands are connected through a semicolon, and the command A is sequentially executed; b). This ensures that log analysis commands are executed after compiled commands are executed.
ii, log analysis command pseudocode is as shown in FIG. 4:
where log analysis commands may be written to shell script execution, those skilled in the art may define the script name as analysis. Sh.
Then the complete command is as follows:
make project new ; ./analysis.sh
therefore, log analysis work can be performed after compiling is completed, and the method is fast and efficient.
Step S520: deleting the standard output catalogue which is not modified in the specific time period, and generating the compiling script re-executing instruction.
Specifically, in the step, the standard output catalogue which is not modified in the specific time period is deleted, so that the unnecessary catalogue in the Android ROM compiling process is deleted, the space of a machine carrying the Android ROM is further improved, then, the compiling script re-executing 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-executing instruction, so that the problem caused by insufficient space is solved, the compiling success rate is further improved, and the working efficiency is improved.
In another embodiment of the invention, an algorithm may be simply designed with respect to clearing space, i.e., deleting standard output directories that have not been modified for a particular period of time. In the code list, a plurality of sets of engineering codes are stored, and whether an out list is modified within 5 days or not can be searched according to the following command by traversing each set of codes, wherein the out list is a standard output list compiled by a ROM, the list is updated if the compiled codes are confirmed, and if the compiled codes are not modified, the set of engineering codes can be deleted recently.
find -name out -ctime -5
Based on the searched results, the old out directory is deleted by rm-rf to obtain enough space, and then compiling is performed again.
make project new;./analysis.sh
In another embodiment of the present invention, as shown in fig. 2, there is further provided a restart compilation control device after a self-identification compilation failure, the device 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 is compiled in real time;
the first judging module is used for identifying whether the 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 pertinently generating a restarting compiling instruction according to the reason of compiling failure if the restarting compiling instruction is judged to be yes, and the restarting compiling instruction is used for controlling the Android ROM to restart compiling.
Optionally, the first judging module further includes:
the second judging module is used for searching whether a preset failure identification keyword for identifying the 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 fails to compile if the judgment result is yes.
In another embodiment of the present invention, the compiling failure determination module is further configured to retrieve, based on the obtained compiling Log file, whether there is a machine cause in the compiling Log file that causes a failure keyword; if yes, judging that the Android ROM compiling fails.
In another embodiment of the present invention, the restart compilation instruction generating module is further configured to generate the machine restart instruction if the determination is yes; the machine restarting instruction is used for controlling the machine carrying 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 carrying the Android ROM to restart the Android ROM compiling.
In another embodiment of the present invention, the compiling failure determination module is further configured to retrieve, based on the obtained compiling Log file, whether there is a failure keyword caused by insufficient space in the compiling Log file; if yes, judging that the Android ROM compiling fails.
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 is yes, where the compiling script re-executing instruction is used for restarting Android ROM compiling by a machine carrying an Android ROM.
In another embodiment of the present invention, the restart compiling instruction generating module is further configured to obtain an intermediate generating directory compiled by the Android ROM; extracting standard output catalogs which are not modified within a specific time period according to the generated intermediate generation catalogs; deleting the standard output catalogue 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, a computer device is further provided, where the computer device includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps described in the above method for restarting the compilation control after the self-identification compilation fails when executing the computer program.
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 Android ROM is compiled in real time; if yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reasons of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling. The method comprises the steps of searching whether a preset failure identification keyword for identifying the compilation failure exists in the compiling Log file or not based on the acquired compiling Log file; and if yes, judging that the Android ROM compiling fails. The method is used for searching whether the compiling Log file has a failure keyword caused by a machine reason or not based on the obtained compiling Log file; if yes, judging that the Android ROM compiling fails. If yes, generating the machine restarting instruction; the machine restarting instruction is used for controlling the machine carrying the Android ROM to restart; generating a recompilation instruction according to the machine restarting instruction, wherein the recompilation instruction is used for controlling a machine carrying Android ROM to restart Android ROM compiling
In another embodiment of the present invention, there is further provided a computer readable storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of the above-described method for restarting compilation control after a self-identification compilation has failed.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The processor is a control center of the computer device, and connects various parts of the whole computer device by various interfaces and lines, and 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 performing overall monitoring of the computer device. Optionally, the processor may include one or more processing cores; preferably, the processor may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, etc., and the modem processor primarily 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 that the processor executes to perform various functional applications and data processing by executing 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 (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, 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 access to the memory by the processor.
The computer equipment also comprises a power supply for supplying power to each component, and the over-power management system realizes the functions of charge management, discharge management, power consumption management and the like. The power supply may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may further comprise an input unit operable to receive input digital or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (8)
1. A method for restarting compilation control after a self-identification compilation failure, the method comprising:
the compiling process is monitored in real time, and a compiling Log file after the Android ROM is compiled is obtained in real time;
identifying keywords identifying compiling failure based on the obtained compiling Log file so as to judge whether the Android ROM compiling fails;
if yes, intervention is performed in time, and a restarting compiling instruction is generated pertinently according to a compiling processing scheme library and the compiling failure reason, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling;
identifying and acquiring a compiling process of which the restarting compiling instruction cannot process compiling failure, and marking the compiling process as a compiling scheme which cannot be processed; recording a processing track of the processing incapability of processing the compiling scheme by manual restoration and adding a successful processing label to the processing track; and adding the processing scheme corresponding to the processing track of the processing incapability of processing the compiling scheme to a preset compiling processing scheme library by manual restoration after the successful processing label is added.
2. The method for controlling restart after self-identification compilation as claimed in claim 1, wherein the failure identification keyword comprises a machine cause failure keyword,
the step of retrieving whether the compiling Log file has a preset failure identification keyword for identifying compiling failure based on the obtained compiling Log file specifically includes:
searching whether a machine cause causes a failure keyword in the compiling Log file based on the obtained compiling Log file;
if yes, judging that the Android ROM compiling fails.
3. The method for controlling restart compilation after self-identification compilation failure according to claim 1, wherein the restart compilation instruction comprises a machine restart instruction and a recompilation instruction;
if the judgment is yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reason of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling, and the method specifically comprises the following steps:
if yes, generating the machine restarting instruction; the machine restarting instruction is used for controlling the machine carrying 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 carrying the Android ROM to restart the Android ROM compiling.
4. The method for controlling restart after self-identification compilation as claimed in claim 1, wherein the failure identification keyword includes a space shortage causing failure keyword,
the step of retrieving whether the compiling Log file has a preset failure identification keyword for identifying compiling failure based on the obtained compiling Log file specifically includes:
searching whether the compiling Log file has a keyword with failure caused by insufficient space or not based on the obtained compiling Log file;
if yes, judging that the Android ROM compiling fails.
5. The method for controlling restart of a compilation after a self-identification compilation failure according to claim 4, wherein the restart compilation instruction comprises a compilation script re-execution instruction;
if the judgment is yes, timely intervention is performed, and a restarting compiling instruction is generated pertinently according to the reason of compiling failure, wherein the restarting compiling instruction is used for controlling the Android ROM to restart compiling, and the method specifically comprises the following steps:
and if so, generating the compiling script re-execution instruction, wherein the compiling script re-execution instruction is used for restarting Android ROM compiling by a machine carrying the Android ROM.
6. A restart compilation control device after a self-identification compilation failure, the device 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 is compiled in real time;
the first judging module is used for identifying whether the Android ROM compiling fails or not based on the obtained compiling Log file;
the restarting compiling instruction generating module is used for timely intervening and pertinently generating restarting compiling instructions according to compiling processing scheme libraries and the reasons of compiling failure if the restarting compiling instructions are judged to be yes, wherein the restarting compiling instructions are used for controlling the Android ROM to restart compiling; identifying and acquiring a compiling process of which the restarting compiling instruction cannot process compiling failure, and marking the compiling process as a compiling scheme which cannot be processed; recording a processing track of the processing incapability of processing the compiling scheme by manual restoration and adding a successful processing label to the processing track; and adding the processing scheme corresponding to the processing track of the processing incapability of processing the compiling scheme to a preset compiling processing scheme library by manual restoration after the successful processing label is added.
7. The apparatus for restarting a compilation control after a self-identification compilation failure according to claim 6, wherein the first determination module further comprises:
the second judging module is used for searching whether a preset failure identification keyword for identifying the 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 fails to compile if the judgment result is yes.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
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 CN112860483A (en) | 2021-05-28 |
CN112860483B true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113382049B (en) * | 2021-05-31 | 2022-04-19 | 山东英信计算机技术有限公司 | Management system and device of modular construction tool MBS |
Citations (4)
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 |
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 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9058192B2 (en) * | 2012-08-09 | 2015-06-16 | Advanced Micro Devices, Inc. | Handling pointers in program code in a system that supports multiple address spaces |
-
2021
- 2021-01-28 CN CN202110121249.8A patent/CN112860483B/en active Active
Patent Citations (4)
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 |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN112860483A (en) | 2021-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106951345B (en) | Consistency test method and device for disk data of virtual machine | |
JP3329841B2 (en) | Network system and its software management method | |
CN104239082A (en) | Hot patching implementation method of embedded system | |
CN109032631A (en) | Application program service packs acquisition methods, device, computer equipment and storage medium | |
CN111382070A (en) | Compatibility testing method and device, storage medium and computer equipment | |
CN111881012A (en) | Log recording method, device, equipment and storage medium | |
US20190042399A1 (en) | Test run control method and apparatus | |
CN111142907A (en) | Partition upgrading method for off-line keyword recognition system | |
CN112860483B (en) | Method and device for restarting compiling control after self-identification compiling failure | |
CN115277677B (en) | Batch file hanging method and device, computer equipment and storage medium | |
CN111651304B (en) | Software recovery method and device based on double-core intelligent ammeter and computer equipment | |
CN110851168B (en) | Data processing method and device and computer readable storage medium | |
CN113315675A (en) | White box switch U-Boot automatic testing method, system and storage medium | |
CN111400128A (en) | Log management method and device, computer equipment and storage medium | |
CN116820932A (en) | BMC fault diagnosis method, device, equipment and medium | |
US20150033213A1 (en) | Compiling method, storage medium and compiling apparatus | |
CN113946509A (en) | Buried point searching and comparing method and device, computing device and readable storage medium | |
CN110321130B (en) | Non-repeatable compiling and positioning method based on system call log | |
CN114077580A (en) | System and method for file operation of wireless portable device by mobile terminal | |
CN114528141A (en) | Method and device for repairing program defects in embedded system kernel mode | |
CN114430300B (en) | Method, system, equipment and medium for testing wireless communication module | |
CN114968277A (en) | Method and device for generating master burning program file, computer equipment and medium | |
CN112083927A (en) | Method for acquiring software SVN version information in power acquisition terminal on site | |
CN113407438B (en) | Module testing method, computer device, and storage medium | |
CN115599595B (en) | Physical backup method based on distributed database |
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 |