File: docheckcommand.cc

package info (click to toggle)
stealth 1.45-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 716 kB
  • ctags: 175
  • sloc: cpp: 1,612; makefile: 88; sh: 70
file content (28 lines) | stat: -rw-r--r-- 1,130 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "scanner.ih"

bool Scanner::doCHECKcommand(Process &child)
{
    removeLOG();                        // remove optional 'LOG ='

    string logfile = s_firstWord[1];    // CHECK keywords are followed by 
                                        // the name of a logfile

    s_firstWord.match(s_firstWord[3]);  // redefine s_firstWord: 1st word
                                        // removed 

    Util::debug() << "running checked command: `" << s_firstWord[0] << "'"
                                                                    << endl;

    if (Arg::instance().option('n')) // -n (no go) option?
        return true;                    // then indicate by implication that
                                        // the command was processed without
                                        // differing from the previous run

    nextCommand(child,                  // otherwise run the command
                    s_firstWord[0]);


                                        // and return whether there are any
                                        // differences. 
    return sameOutput(logfile, child);
}