コード例 #1
0
ファイル: aot.cs プロジェクト: tondat/xamarin-macios
		public void WhenAOTFails_ShouldReturnError ()
		{
			RunCommandDelegate runThatErrors = (path, args, env, output, suppressPrintOnErrors) => 42;
			var options = new AOTOptions ("all");

			AssertThrowErrorWithCode (() => Compile (options, new TestFileEnumerator (FullAppFileList), onRunDelegate : runThatErrors), 3001);
		}
コード例 #2
0
ファイル: aot.cs プロジェクト: tondat/xamarin-macios
		public void WhenAssemblyStrippingFails_ShouldThrowError ()
		{
			RunCommandDelegate runThatErrors = (path, args, env, output, suppressPrintOnErrors) => path.Contains ("mono-cil-strip") ? 42 : 0;

			var options = new AOTOptions ("all|hybrid");

			AssertThrowErrorWithCode (() => Compile (options, new TestFileEnumerator (FullAppFileList), onRunDelegate : runThatErrors, isRelease : true), 3001);
		}
コード例 #3
0
ファイル: wmpiexec.cs プロジェクト: dbrowneup/pmap
        public wmpiexec()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            expanded_dialog_difference = mpich1_browse_button.Bottom - show_bottom_checkBox.Bottom + 8;
            //MessageBox.Show(string.Format("difference = {0}", mpich1_browse_button.Bottom - show_bottom_checkBox.Bottom));

            run_command = null;
            last_execute_result = null;
            UpdateExtraControls(show_bottom_checkBox.Checked);
            EnableApplicationControls();
            DisableConfigfileControls();
            DisableMPICH1Controls();
        }
コード例 #4
0
ファイル: wmpiexec.cs プロジェクト: dbrowneup/pmap
 private void execute_button_Click(object sender, System.EventArgs e)
 {
     VerifyEncryptedPasswordExists();
     execute_button.Enabled = false;
     break_button.Enabled = true;
     output_richTextBox.Clear();
     if (last_execute_result != null)
     {
         run_command.EndInvoke(last_execute_result);
     }
     // Create the command line
     command_line_textBox.Text = get_command_line();
     // Add the command to the application drop down if it has not already been added
     bool found = false;
     foreach (string str in application_comboBox.Items)
     {
         if (str == application_comboBox.Text)
             found = true;
     }
     if (!found)
     {
         application_comboBox.Items.Add(application_comboBox.Text);
     }
     run_command = new RunCommandDelegate(RunCommand);
     last_execute_result = run_command.BeginInvoke(command_line_textBox.Text, mpiexec_command, mpiexec_command_args, popup_checkBox.Checked, null, null);
     // after starting a command move to the output box so the user can interact with the running process.
     output_richTextBox.Focus();
 }
コード例 #5
0
 public void SetCommand(RunCommandDelegate command)
 {
     _command = command;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the ScriptCommandInfo class.
 /// </summary>
 /// <param name="commandTitle"></param>
 /// <param name="commandDescription"></param>
 /// <param name="command"></param>
 public ScriptCommandInfo(string commandTitle, string commandDescription, RunCommandDelegate command)
 {
     _CommandTitle       = commandTitle;
     _CommandDescription = commandDescription;
     _command            = command;
 }
コード例 #7
0
ファイル: aot.cs プロジェクト: tondat/xamarin-macios
		void Compile (AOTOptions options, TestFileEnumerator files, AOTCompilerType compilerType = AOTCompilerType.Bundled64, RunCommandDelegate onRunDelegate = null, bool isRelease = false, bool isModern = false)
		{
			AOTCompiler compiler = new AOTCompiler (options, compilerType, isModern, isRelease)
			{
				RunCommand = onRunDelegate != null ? onRunDelegate : OnRunCommand,
				ParallelOptions = new ParallelOptions () { MaxDegreeOfParallelism = 1 },
				XamarinMacPrefix = Xamarin.Tests.Configuration.SdkRootXM,
			};
			try {
				Profile.Current = new XamarinMacProfile ();
				compiler.Compile (files);
			} finally {
				Profile.Current = null;
			}
		}
コード例 #8
0
ファイル: aot.cs プロジェクト: wondercrazy15/xamarin-macios
        void Compile(AOTOptions options, TestFileEnumerator files, AOTCompilerType compilerType = AOTCompilerType.Bundled64, RunCommandDelegate onRunDelegate = null, bool isRelease = false, bool isModern = false)
        {
            AOTCompiler compiler = new AOTCompiler(options, compilerType, isModern, isRelease)
            {
                RunCommand      = onRunDelegate != null ? onRunDelegate : OnRunCommand,
                ParallelOptions = new ParallelOptions()
                {
                    MaxDegreeOfParallelism = 1
                },
                XamarinMacPrefix = Driver.WalkUpDirHierarchyLookingForLocalBuild(),                  // HACK - AOT test shouldn't need this from driver.cs
            };

            try {
                Profile.Current = new XamarinMacProfile();
                compiler.Compile(files);
            } finally {
                Profile.Current = null;
            }
        }
コード例 #9
0
ファイル: aot.cs プロジェクト: yizhang82/xamarin-macios
        void Compile(AOTOptions options, TestFileEnumerator files, AOTCompilerType compilerType = AOTCompilerType.Bundled64, RunCommandDelegate onRunDelegate = null)
        {
            AOTCompiler compiler = new AOTCompiler(options, compilerType)
            {
                RunCommand      = onRunDelegate != null ? onRunDelegate : OnRunCommand,
                ParallelOptions = new ParallelOptions()
                {
                    MaxDegreeOfParallelism = 1
                },
                XamarinMacPrefix = Driver.WalkUpDirHierarchyLookingForLocalBuild(),                  // HACK - AOT test shouldn't need this from driver.cs
            };

            compiler.Compile(files);
        }