Commit 7222dde8 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Updated gitlab with internal tests

parent 6fb9d524
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -3,10 +3,20 @@ stages:
  - compile
  - test
  - extra
  - internal

.default:
  rules:
    - when: on_success
  timeout: 5m

.skip_when_internal:
  rules:
    - if: '$INTERNAL_TESTS == "1"'
      when: never
    - when: on_success

include:
  - local: 'ci_cd/problem1b.yml'   # IntegerP
  - local: 'ci_cd/problem1c.yml'   # RationalP
default:
  timeout: 5m
+13 −2
Original line number Diff line number Diff line
@@ -58,8 +58,19 @@ extra_1b:
    - make extra1b
    - score="$(./extra1b | tail -n 1 | tr -d '[:space:]')"
    - echo "Your score is $score"
    # - echo "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=extra1c&name=${GITLAB_USER_NAME}&score=${score}"
    - curl "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=extra1b&name=${GITLAB_USER_LOGIN}&score=${score}"
  rules:
    - if: '$CI_COMMIT_REF_NAME == "problem1b"'
  extends: .skip_when_internal
  tags: [ c++-17 ]

more_integerp:
  stage: internal
  needs:
    - job: compile_problem_1b
      artifacts: true
  script:
    - cd hw0/tests
    - make more1b
    - score="$(./more1b | tail -n 1 | tr -d '[:space:]')"
    - curl "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=hw0_more1b&name=${GITLAB_USER_LOGIN}&score=${score}" # log the score for easy grading
 No newline at end of file
+14 −1
Original line number Diff line number Diff line
@@ -65,4 +65,17 @@ extra_1c:
    - curl "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=extra1c&name=${GITLAB_USER_LOGIN}&score=${score}"
  rules:
    - if: '$CI_COMMIT_REF_NAME == "problem1c"'
  extends: .skip_when_internal
  tags: [c++-17]

more_rationalp:
  stage: internal
  needs:
    - job: compile_problem_1c
      artifacts: true
  script:
    - cd hw0/tests
    - make more1c
    - score="$(./more1c | tail -n 1 | tr -d '[:space:]')"
    - curl "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=hw0_more1b&name=${GITLAB_USER_LOGIN}&score=${score}" # log the score for easy grading
  tags: [ c++-17 ]
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -77,5 +77,6 @@ int main() {
    test_b();

    cout << "Total points:  " << total << endl;
    cout << total << endl; // for the score recorder in the gitlab job
    return 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
#include "RationalP.h"
using namespace std;

const float PTS = 0.25;
const float PTS = 1.0;
float total = 0;

/**
@@ -84,7 +84,6 @@ void test_c() {

    // Huge negative exponent: 2^-20000 ~ 0;
    RationalP huge_neg({-20000});
    long double v2 = huge_neg.trunc();
    // (2^20000)*(2^-20000) = 1
    RationalP prod = huge_pos * huge_neg;

@@ -97,5 +96,6 @@ int main() {
    test_c();

    cout << "Total points:  " << total << endl;
    cout << total << endl; // for the score recorder in the gitlab job
    return 0;
}
 No newline at end of file