Attached is a simple test step that uses the itteration from a repeat step to determine if a sequence should be run. It’s intended to allow disabling a test head in a multi-DUT tester. Placing a If Verdict after this step always detects the verdict as NotSet even though the Step shows the verdict as pass or inconclusive. Am I doing something wrong or is this a bug?
//Copyright 2012-2019 Keysight Technologies
//
//Licensed under the Apache License, Version 2.0 (the “License”);
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an “AS IS” BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Threading;
using OpenTap.Plugins.Interfaces.Rugby_GW;
using OpenTap.Plugins.IndiePlugins.InstClass;
using OpenTap;
namespace OpenTap.Plugins.IndiePlugins
{
[Display(“Is Dut Enabled”, Groups: new { “Indie”, “Plugin Development”, “LIN”, “TestStep” }, Description: “A TestStep that Sequences DUTS”)]
public class IsDutEnabled : TestStep
{
[Display(“enDUT1”, Group: “DutControl”, Order: 1)]
public bool enDUT1 { get; set; }
[Display(“enDUT2”, Group: “DutControl”, Order: 2)]
public bool enDUT2 { get; set; }
[Display(“enDUT3”, Group: “DutControl”, Order: 3)]
public bool enDUT3 { get; set; }
[Display(“enDUT4”, Group: “DutControl”, Order: 4)]
public bool enDUT4 { get; set; }
[Display(“enDUT5”, Group: “DutControl”, Order: 5)]
public bool enDUT5 { get; set; }
[Display(“enDUT6”, Group: “DutControl”, Order: 6)]
public bool enDUT6 { get; set; }
[Display("myDUT", Group: "DutControl", Order: 9)]
public Input<string> myDut { get; set; }
// Output values can be used as inputs to other test steps (see HandleInputs.cs).
// These are useful when test step depend on output from other steps.
[Output]
[Display("DUT", Group: "DutControl", Order: 8)]
public int CurrentDut { get; private set; }
public Verdict myVerdict { get; set; }
public IsDutEnabled()
{
enDUT1 = true;
enDUT2 = true;
enDUT3 = true;
enDUT4 = true;
enDUT5 = true;
enDUT6 = true;
CurrentDut =1;
myDut = new Input <string>();
// MyVerdict = Verdict.NotSet;
}
public override void Run()
{
myVerdict = Verdict.Inconclusive;
CurrentDut = Convert.ToByte(myDut.Value.Split(’ ')[0]);
switch (CurrentDut)
{
case 0:
break;
case 1:
if (enDUT1)
{
myVerdict = Verdict.Pass;
}
break;
case 2:
if (enDUT2)
{
myVerdict = Verdict.Pass;
}
break;
case 3:
if (enDUT3)
{
myVerdict = Verdict.Pass;
}
break;
case 4:
if (enDUT4)
{
myVerdict = Verdict.Pass;
}
break;
case 5:
if (enDUT5)
{
myVerdict = Verdict.Pass;
}
break;
case 6:
if (enDUT6)
{
myVerdict = Verdict.Pass;
}
break;
}
}
}
}