Skip to content

Commit

Permalink
test should fail if gpu is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
staszek-krotki committed Mar 29, 2024
1 parent 7513a0d commit b246678
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::rc::Rc;
use std::time::Duration;

use actix::prelude::*;
use anyhow::Context;
use anyhow::{anyhow, Context};
use chrono::Utc;
use clap::Parser;
use futures::prelude::*;
Expand Down Expand Up @@ -199,8 +199,12 @@ async fn run<RUNTIME: process::Runtime + Clone + Unpin + 'static>(
return Ok(());
}
Command::Test => {
offer_template::gpu_detection(&runtime_config)?;
return Ok(());
match offer_template::gpu_detection(&runtime_config)
{
Ok(Some(_)) => return Ok(()),
Ok(None) => return Err(anyhow!("Gpu not available")),
Err(e) => return Err(anyhow!(e)),
}
}
};

Expand Down

0 comments on commit b246678

Please sign in to comment.