Skip to content

Commit

Permalink
Merge pull request #425 from JakeRoggenbuck/fix-some-errors
Browse files Browse the repository at this point in the history
Fix tests for amd
  • Loading branch information
JakeRoggenbuck authored Sep 27, 2022
2 parents e72c7bf + c4c6d7f commit 98d6b99
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ fn interpret_govs(governors_string: &mut String) -> Result<Vec<String>, Error> {
.split(' ')
.into_iter()
.map(|x| x.to_owned())
.filter(|x| x != "")
.collect();
Ok(governors)
}
Expand Down Expand Up @@ -509,7 +510,14 @@ microcode : 0xea
);

for x in check_available_governors()? {
assert!(x == "powersave" || x == "performance");
assert!(
x == "powersave"
|| x == "performance"
|| x == "schedutil"
|| x == "conservative"
|| x == "ondemand"
|| x == "userspace"
);
}
Ok(())
}
Expand Down Expand Up @@ -543,7 +551,7 @@ microcode : 0xea
assert!(x.cur_freq > 0);
assert!(x.cur_temp > -100);

assert!(x.gov == "powersave" || x.gov == "performance");
assert!(x.gov == "powersave" || x.gov == "performance" || x.gov == "schedutil");
}
}

Expand Down Expand Up @@ -574,7 +582,7 @@ microcode : 0xea
assert_eq!(type_of(list_cpu_governors()), type_of(Vec::<String>::new()));

for x in list_cpu_governors() {
assert!(x == "powersave" || x == "performance");
assert!(x == "powersave" || x == "performance" || x == "schedutil");
}
}
}

0 comments on commit 98d6b99

Please sign in to comment.