self.run_standalone_scenario

in tasks/e2e.rb [79:131]


    def self.run_standalone_scenario(config, config_name)
        
        prepare_for_standalone(E2E_STANDALONE_SAMPLE_DIR)

        puts 'Building standalone producer...'
        
        clean_git

        Dir.chdir(E2E_STANDALONE_SAMPLE_DIR) do
            system 'git checkout -f .'
            
            rcinfo_path = '.rcinfo'
            rcinfo = YAML.load(File.read(rcinfo_path)).merge(config)
            File.open(rcinfo_path, 'w') {|f| f.write rcinfo.to_yaml }

            
            system("pwd")
            system("#{XCRC_BINARIES}/xcprepare integrate --input StandaloneApp.xcodeproj --mode producer --final-producer-target StandaloneApp --configurations-exclude #{CONFIGURATIONS_EXCLUDE}")
            
            build_project(nil, "StandaloneApp.xcodeproj", 'WatchExtension', 'watch', 'watchOS', CONFIGURATION)
            build_project(nil, "StandaloneApp.xcodeproj", 'StandaloneApp', 'iphone', 'iOS', CONFIGURATION)
            system("#{XCRC_BINARIES}/xcprepare stats --reset --format json")
        end

        puts 'Building standalone consumer...'

        
        
        consumer_srcroot = "#{E2E_STANDALONE_SAMPLE_DIR}_consumer_#{config_name}"
        system("mv #{E2E_STANDALONE_SAMPLE_DIR} #{consumer_srcroot}")
        begin
            prepare_for_standalone(consumer_srcroot)
            Dir.chdir(consumer_srcroot) do
                system("#{XCRC_BINARIES}/xcprepare integrate --input StandaloneApp.xcodeproj --mode consumer --final-producer-target StandaloneApp --consumer-eligible-configurations #{CONFIGURATION} --configurations-exclude #{CONFIGURATIONS_EXCLUDE}")
                build_project(nil, "StandaloneApp.xcodeproj", 'WatchExtension', 'watch', 'watchOS', CONFIGURATION, {'derivedDataPath' => "#{DERIVED_DATA_PATH}_consumer_#{config_name}"})
                build_project(nil, "StandaloneApp.xcodeproj", 'StandaloneApp', 'iphone', 'iOS', CONFIGURATION, {'derivedDataPath' => "#{DERIVED_DATA_PATH}_consumer_#{config_name}"})
                valide_hit_rate(OpenStruct.new(DEFAULT_EXPECTATIONS))

                puts 'Building standalone consumer with local change...'
                
                system("echo '' >> StandaloneApp/StandaloneObjc.m")
                build_project(nil, "StandaloneApp.xcodeproj", 'WatchExtension', 'watch', 'watchOS', CONFIGURATION, {'derivedDataPath' => "#{DERIVED_DATA_PATH}_consumer_local_#{config_name}"})
                build_project(nil, "StandaloneApp.xcodeproj", 'StandaloneApp', 'iphone', 'iOS', CONFIGURATION, {'derivedDataPath' => "#{DERIVED_DATA_PATH}_consumer_local_#{config_name}"})
            end
        ensure
            puts("reverting #{E2E_STANDALONE_SAMPLE_DIR}")
            system("mv #{consumer_srcroot} #{E2E_STANDALONE_SAMPLE_DIR}")
        end

        
        clean
    end