old_contents: import sys
  from OMPython import OMCSession
  
  # List of the test examples that will be checked
  
  omc = OMCSession()
  omc.sendExpression("loadModel(Modelica)")
  omc.sendExpression('loadFile("/OpenIPSL/OpenIPSL/package.mo")')
  omc.sendExpression("getClassNames()")
  '''
  test_list = ["OpenIPSL.Examples.Machines.PSSE.GENSAL",
               "OpenIPSL.Examples.Machines.PSSE.GENSAE",
               "OpenIPSL.Examples.Machines.PSSE.GENROE",
               "OpenIPSL.Examples.Machines.PSSE.GENROU"]
  '''
  
  
  # Get the list of all test cases in class DevelopmentExamples
  test_list = omc.sendExpression('getClassNames(OpenIPSL,recursive=true)')
  nFailed = 0
  nPassed = 0
  
  for test in test_list:
      if omc.sendExpression("isModel(%s)" % (test)):
          passMsg = omc.sendExpression("checkModel(%s)" % (test))
          failMsg = omc.sendExpression("getErrorString()")
          if "completed successfully." in passMsg:
  # print passMsg
              nPassed += 1
          else:
              print failMsg
              nFailed += 1
  
  print "============================= Check Summary =============================="
  print "Number of models that passed the check is: %s" % nPassed
  print "Number of models that failed the check is: %s" % nFailed
  
  if nFailed:
      sys.exit(1)
  
new_contents: import sys
  from OMPython import OMCSession
  
  
  class CITests():
      '''
      Python class used to run CI tests
      '''
      def __init__(self, rootPath):
          '''
          Constructor starts omc and loads MSL
          '''
          self.rootPath = rootPath
          self.omc = OMCSession()
          os.chdir(self.rootPath)
          self.omc.sendExpression("loadModel(Modelica)")
  
  
      def loadLib(self, libPath):
          # Attempt to load the library
          if self.omc.sendExpression('loadFile("%s")' % (self.rootPath + self.libPath)):
              print "%s is successfully loaded." % libPath
          else:
              raise Exception('%s was not loaded! Check the library path.')  % libPath
  
      def runCheck(self, libName, libPath):
          # Load library
          loadLib(libPath)
          '''
          Checks all of the models in the library and returns number of faild checks
          '''
          # Get the list of all classes in OpenIPSL
          test_list = self.omc.sendExpression('getClassNames(%s,recursive=true)' % libName)
          nFailed = 0
          nPassed = 0
  
          # Run the check for all classes that are model and print result msgs
          print "============================ Checking Models ============================="
          for test in test_list:
              if self.omc.sendExpression("isModel(%s)" % (test)):  # Check if a class is a model
                  passMsg = self.omc.sendExpression("checkModel(%s)" % (test))
                  failMsg = self.omc.sendExpression("getErrorString()")
                  if "completed successfully." in passMsg:
                      # print passMsg
                      nPassed += 1
                  else:
                      print failMsg
                      nFailed += 1
          # Print a check summary
          print "============================= Check Summary =============================="
          print "Number of models that passed the check is: %s" % nPassed
          print "Number of models that failed the check is: %s" % nFailed
          return (nFailed == 0)
  
  # Instance of CITests
  ci = CITests("/OpenIPSL")
  # Run Check on OpenIPSL
  passLib = ci.runCheck("OpenIPSL","/OpenIPSL/package.mo")
  
  # Libs in Application Examples
  passAppEx = 0
  appExamples = {
  "KundurSMIB":"/Application\ Examples/KundurSMIB/package.mo",
  "TwoAreas":"/Application\ Examples/TwoAreas/package.mo",
  "SevenBus":"/Application\ Examples/SevenBus/package.mo",
  "IEEE9":"/Application\ Examples/IEEE9/package.mo",
  "IEEE14":"/Application\ Examples/IEEE14/package.mo",
  "AKD":"/Application\ Examples/AKD/package.mo",
  "PSAT_Systems":"/Application\ Examples/PSAT_Systems/package.mo",
  "N44":"/Application\ Examples/N44/package.mo",
  }
  
  for package in appExamples.keys():
      passAppEx = passAppEx + ci.runCheck(package,appExamples[package])
  
  
  # The tests are failing if the number of failed check > 0
  if (not passAppEx) or (not passingCheck):
      sys.exit(1)
  
subject: Change CI script to include the application examples