# Failing tests reported by Racket repo

**URL:** <https://racket.discourse.group/t/failing-tests-reported-by-racket-repo/2434>\
**Category:** Questions & Answers\
**Created:** [October 27, 2023, 1:48pm UTC](https://racket.discourse.group/t/failing-tests-reported-by-racket-repo/2434 "2023-10-27T13:48:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrvoje064](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/hrvoje064/32/729_2.png) [@hrvoje064](https://racket.discourse.group/u/hrvoje064)\
**Post date:** [October 27, 2023, 1:48pm UTC](https://racket.discourse.group/t/failing-tests-reported-by-racket-repo/2434/1 "2023-10-27T13:48:32Z")

</div>

My first try to create a package on [racket-lang.org](http://racket-lang.org) package repo, and I have a question (so far only one 😁).

I created a package there earlier today, and there were some orange remarks about license, about missing docs... That I really could not understand, because I checked (after checking racket docs) and my info.rkt file looked OK. Anyway I left it like that. Now a few hours later, all seems OK. All green, but there's a new problem. Orange button "failing tests"

After checking the test printout, it seems that two failing tests both timed out after 90 seconds. I verified that by running locally

```scheme
raco test -p math-quiz

```

And yes, this time-out is math-quiz starting a GUI window, and waiting for user input. As I'm new to modules, when "raco pkg install" run in my math-quiz directory, it created a main.rkt program, that I did not have before. So, the only thing I did with it is to add (require "math-quiz.rkt"), that was the main module before. Anyway result is that both of these files could start the program (GUI).  
My remedy was to include this in main.rkt:

```scheme
(require "math-quiz.rkt")

;;; Starting the GUI
;;; ===========================================================
(send main-window show #t)
;;; disable popup menus
(disable/enable-popup-window-menu #f)

```

And to remove above commands from math-quiz.rkt file. So now only main module can start the GUI.

And then in info.rkt I added this:

```scheme
(define test-omit-paths '("main.rkt"))

```

When tested locally with raco test, all tests run OK.

I can safely omit tests on main.rkt module, because apart from above 3 lines, there's nothing there.

These mods are now pushed to GitHub.

So, my question is this: do I have to edit the package on [racket-lang.org](http://racket-lang.org) repo, or will this be taken care of automatically?

---

<div class="post-metadata">

**Author:** ![hrvoje064](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/hrvoje064/32/729_2.png) [@hrvoje064](https://racket.discourse.group/u/hrvoje064)\
**Post date:** [October 28, 2023, 2:01pm UTC](https://racket.discourse.group/t/failing-tests-reported-by-racket-repo/2434/2 "2023-10-28T14:01:23Z")

</div>

This question is solved by the Racket repo. It updated the tests automatically and now all passed.

---

<div class="post-metadata">

**Author:** ![ben\_greenman](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/ben_greenman/32/632_2.png) [@ben\_greenman](https://racket.discourse.group/u/ben_greenman)\
**Post date:** [October 28, 2023, 10:12pm UTC](https://racket.discourse.group/t/failing-tests-reported-by-racket-repo/2434/3 "2023-10-28T22:12:10Z")

</div>

an alternative: check if the CI environment variable is set, and skip tests if so

that way lets you run some tests in a file & skip others

---

<div class="post-metadata">

**Author:** ![hrvoje064](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/hrvoje064/32/729_2.png) [@hrvoje064](https://racket.discourse.group/u/hrvoje064)\
**Post date:** [October 29, 2023, 6:58am UTC](https://racket.discourse.group/t/failing-tests-reported-by-racket-repo/2434/4 "2023-10-29T06:58:37Z")

</div>

Thanks. I looked into this, but I wasn't able to figure out how this works. Anyway, no problem. My original fix works well.

---

<div class="post-metadata">

**Author:** ![greghendershott](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/greghendershott/32/98_2.png) [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Post date:** [October 30, 2023, 2:56pm UTC](https://racket.discourse.group/t/failing-tests-reported-by-racket-repo/2434/5 "2023-10-30T14:56:35Z")

</div>

> [@hrvoje064](#):
>
> I looked into this, but I wasn't able to figure out how this works. Anyway, no problem. My original fix works well.

`test-omit-paths` is perfect for excluding an entire file (or subdirectory).

Someday, if you ever do want to skip only _some_ tests within a file, what @ben_greenman mentioned works well. It's really just wrapping them in a conditional:

```scheme
(unless (getenv "CI")
  ;; tests
  )

```

I'm 99% sure the Racket package build service also sets `"CI"`.

* * *

p.s. Rarely you might have a test that works everywhere but the Racket package build server. (Maybe the test does HTTP requests to some public server, which doesn't like requests from there. Or whatever reason.) For that, same technique, just a different env var:

```scheme
(unless (getenv "PLT_PKG_BUILD_SERVICE")
  ;; tests
  )

```

---

<div class="post-metadata">

**Author:** ![hrvoje064](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/hrvoje064/32/729_2.png) [@hrvoje064](https://racket.discourse.group/u/hrvoje064)\
**Post date:** [October 31, 2023, 2:49am UTC](https://racket.discourse.group/t/failing-tests-reported-by-racket-repo/2434/6 "2023-10-31T02:49:54Z")

</div>

Thanks, now I get this. The problem with the ben\_greenman answer was that I read `CI` as `Cl`.
