#!/usr/bin/python

from azuremodules import *

def RunTest(command):
    UpdateState("TestRunning")
    RunLog.info("Checking WALinuxAgent in running processes")
    temp = Run(command)
    timeout = 0
    output = temp
    if ("waagent" in output) :
                    RunLog.info('waagent service present in running processes')
                    ResultLog.info('PASS')
                    UpdateState("TestCompleted")
    else:
                    RunLog.error('waagent service absent in running processes')
                    ResultLog.Error('FAIL')
                    UpdateState("TestCompleted")
        
<<<<<<< HEAD
<<<<<<< HEAD
RunTest("ps -ef | grep waagent | grep -v grep")
=======
RunTest("ps -ef | grep waagent | grep -v 'grep waagent'")
>>>>>>> minor fix
=======
RunTest("ps -ef | grep waagent | grep -v waagent")
>>>>>>> minor fix

@@ -612,33 +612,8 @@
    %0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A%3C%3C%3C%3C%3C%3C%3C HEAD
 %0ARun
@@ -661,165 +661,5 @@
 p%22)%0A
-=======%0ARunTest(%22ps -ef %7C grep waagent %7C grep -v 'grep waagent'%22)%0A%3E%3E%3E%3E%3E%3E%3E minor fix%0A=======%0ARunTest(%22ps -ef %7C grep waagent %7C grep -v waagent%22)%0A%3E%3E%3E%3E%3E%3E%3E minor fix
 %0A

resolve conflict