<commit_before>package TurboRav

import Chisel._
import scala.math.BigInt

class GpioHybridTest(c: Soc, test_name: String)
extends JUnitTester(c, isTrace = true) {

  expect(! getLed1Status(), "LED should be off on boot")

  // Wait for SW to drive LED 1, signaling that it has entered main.
  while(! getLed1Status())
  {
    step(1)
  }
  // Wait for SW drive LED 1 low again.
  while(getLed1Status())
  {
    step(1)
  }

  println("CPU has entered main")

  println("Driving BTN2 high")
  driveBtn2(true)

  // Expect that eventually the LED will be driven high.
  while(! getLed1Status())
  {
    step(1)
  }
  println("LED1 was driven high")

  for(i <- 0 until 200){
    expect(getLed1Status(), "LED should be held high")

    step(1)
  }

  println("Driving BTN2 low")
  driveBtn2(false)

  // Expect that eventually the LED will be driven low.
  while(getLed1Status())
  {
    step(1)<commit_msg>GpioHybridTest: Don't hang on failure<commit_after>package TurboRav

import Chisel._
import scala.math.BigInt

class GpioHybridTest(c: Soc, test_name: String)
extends JUnitTester(c, isTrace = true) {

  expect(! getLed1Status(), "LED should be off on boot")

  // Wait for SW to drive LED 1, signaling that it has entered main.
  while(! getLed1Status())
  {
    step(1)
  }
  // Wait for SW drive LED 1 low again.
  while(getLed1Status())
  {
    step(1)
  }

  println("CPU has entered main")

  println("Driving BTN2 high")
  driveBtn2(true)

  // Expect that after 1000 cycles, the LED will be driven high.
  step(1000)
  expect(getLed1Status(), "LED should have been driven high")

  for(i <- 0 until 200){
    expect(getLed1Status(), "LED should be held high")

    step(1)
  }

  println("Driving BTN2 low")
  driveBtn2(false)

  // Expect that eventually the LED will be driven low.
  while(getLed1Status())
  {
    step(1)
{'fraction_non_alphanumeric': 0.11383442265795207, 'fraction_numerical': 0.027233115468409588, 'mean_word_length': 3.353080568720379, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6637607', 'n_tokens_mistral': 687, 'n_tokens_neox': 637, 'n_words': 204}