Пример #1
0
        protected void CleanDevice(ITargetDevice Device)
        {
            Gauntlet.Log.Info("Cleaning {0}", Device.Name);

            if (Device.IsOn == false)
            {
                Device.PowerOn();
            }

            if (Device.IsAvailable == false)
            {
                Gauntlet.Log.Info("{0} is not available, skipping", Device.Name);
                return;
            }

            Device.Connect();

            if (Device.IsConnected == false)
            {
                Gauntlet.Log.Warning("Failed to connect to {0}", Device.Name);
                return;
            }

            /*if (Device is TargetDevicePS4)
             * {
             *      CleanPS4(Device as TargetDevicePS4);
             * }*/

            // disconnect and power down
            Gauntlet.Log.Info("Powering down and disconnecting from {0}", Device.Name);
            Device.Disconnect();
            // turns out this may be a bad idea.. sorry environment.
            //Device.PowerOff();
        }
Пример #2
0
        protected bool CheckEssentialFunctions(ITargetDevice TestDevice)
        {
            // Device should power on (or ignore this if it's already on);
            CheckResult(TestDevice.PowerOn() && TestDevice.IsOn, "Failed to power on device");

            // Device should reboot (or pretend it did)
            CheckResult(TestDevice.Reboot(), "Failed to reboot device");

            // Device should connect
            CheckResult(TestDevice.Connect() && TestDevice.IsConnected, "Failed to connect to device");

            return(TestFailures.Count == 0);
        }