Skip to content

Latest commit

 

History

History
50 lines (42 loc) · 1.71 KB

CONTRIBUTING.md

File metadata and controls

50 lines (42 loc) · 1.71 KB

Contribution Guidelines

  1. Create a source code repository [PROGRAM]-[VERSION] at prosyslab-warehouse and push the original code. If multiple versions are affected by the bug, pick the latest one.
  2. Create a directory [PROGRAM]/[VERSION] in benchmark.
  3. Write a Dockerfile in the directory following the template below:
FROM prosyslab/bug-bench-base

RUN apt-get -y update
RUN apt-get -y install [put your dependencies]

COPY build.sh $SRC

ENV URL=https://github.com/prosyslab-warehouse/[PROGRAM REPO, e.g., tar-1.28.git]
ENV PROGRAM=[source directory name, e.g., tar-1.28]

RUN git clone $URL

WORKDIR $PROGRAM
  1. Write a build script build.sh in the directory following the template below:
#!/usr/bin/env bash

[Build commands to generate Makefile]

if [[ $1 == "sparrow" ]]; then
  [Put smake commands here. If you are not sure, put the following command:]
  echo "TODO: $1"
  exit 1
elif [[ $1 == "infer" ]]; then
  [Put infer commands here. For example:]
  $INFER_BIN capture -- make
  cp -r infer-out $OUT
  [If you are not sure, put the following command:]
  echo "TODO: $1"
  exit 1
elif [[ $1 == "codeql" ]]; then
  [Put codeql commands here. For example:]
  $CODEQL_BIN database create --language=cpp --command="make" codeql-db
  cp -r codeql-db $OUT
  [If you are not sure, put the following command:]
  echo "TODO: $1"
  exit 1
else
  echo "Unknown build target"
  exit 1
fi
  1. Write a label file label.json in the directory. See the other examples in this repository. Make sure the file is properly formatted using js-beautify and passes the format checking by running bin/check-format.