args_with_flags

in lib/gitlab/qa/component/specs.rb [163:180]


        def args_with_flags(feature_flag_set, retry_process: false)
          return args if feature_flag_set.empty? && !retry_process

          run_args = if !retry_process
                       args.dup
                     elsif args.include?("--")
                       qa_args, rspec_args = args.split("--")
                       [*qa_args, "--"] + args_without_spec_arguments(rspec_args).push("--only-failures")
                     else
                       args.dup.push("--", "--only-failures")
                     end

          return run_args if feature_flag_set.empty?

          Runtime::Logger.info("Running with feature flag: #{feature_flag_set.join(' ')}")
          run_args.insert(1, *feature_flag_set)
        end