Struct Spec

Source
pub struct Spec {
    pub description: String,
    pub repository_url: String,
    pub git_ref: String,
    pub command: String,
}
Expand description

A project specification.

Fields§

§description: String

The project description.

This gets put on the HTML report front page.

§repository_url: String

The project git repository URL.

This is where the project source is cloned from.

§git_ref: String

The git ref to use.

This can be anything git checkout can check out. Usually it is a branch name. If it’s a tag or commit id or something else that doesn’t ever change, the wumpus hunter doesn’t get changes to the repository and always runs tests for the same commit.

§command: String

The shell command to run to run the test suite.

This will be passed onto the bash shell.

Implementations§

Source§

impl Spec

Source

pub fn from_file(filename: &Path) -> Result<Self>

Load a Spec from a file.

Source

pub fn versions(&self, run_log: &mut RunLog) -> Result<()>

Query versions of important tools.

Source

pub fn git_clone(&self, working_dir: &Path, run_log: &mut RunLog) -> Result<()>

Clone the specified repository to the desired directory.

Source

pub fn git_remote_update( &self, working_dir: &Path, run_log: &mut RunLog, ) -> Result<()>

Update the information about git remotes checked out repository.

Source

pub fn git_checkout( &self, working_dir: &Path, committish: &str, run_log: &mut RunLog, ) -> Result<()>

Check out the desired ref.

Source

pub fn git_head( &self, working_dir: &Path, run_log: &mut RunLog, ) -> Result<String>

Return the commit id currently checked out.

Source

pub fn git_commit_date( &self, working_dir: &Path, commit: &str, run_log: &mut RunLog, ) -> String

Return the date for a specified commit.

Source

pub fn run_test_suite( &self, working_dir: &Path, timeout: usize, tmpdir: &Path, run_log: &mut RunLog, ) -> Result<(String, bool)>

Run the test suite once.

Trait Implementations§

Source§

impl Debug for Spec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Spec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Spec

§

impl RefUnwindSafe for Spec

§

impl Send for Spec

§

impl Sync for Spec

§

impl Unpin for Spec

§

impl UnwindSafe for Spec

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T