Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4124280
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:43:13+00:00 2026-05-20T23:43:13+00:00

Full disclosure: this is for a school project. The project is in C++. They

  • 0

Full disclosure: this is for a school project. The project is in C++. They usually want us to use their lab computers, which are UNIX systems, which means that the makefile works fine on the lab comps. But, like most lab comps, they are pieces of crap. I’ve lost more than one project to their nonsense. But, that is neither here nor there.

As I said, I have this UNIX makefile. I don’t care about the compilation instructions; I will let msbuild handle that. What I do care about are the testing procedures at the end of the makefile. These are the tests (using another .cpp file) that my project must pass in order for it to be graded. Now, I would like to do this project in vs, but I am not sure how to convert the instructions from the UNIX makefile into something that msbuild can understand. Is there a way to add this to the xml file in vs? Should I use a post-build command line option to run these tests? What is my best option here? I included the relevant code from the makefile below. I know I can just run each test separately from the command line, but that would be excruciatingly time-consuming. Any advice, etc., would be greatly appreciated. Thanks!

Note that I removed the compile instructions for the other files as they (I don’t think) are relevant to my question.
CODE:

test:
rm -f test_results
ListTemplateTest && \
    (echo "ListTemplateTest OK" >> test_results) || \
    (echo "ListTemplateTest Failed" >> test_results) && \
HashTableTemplateTest test1 && \
    (echo "HashTableTemplateTest test1  OK" >> test_results) || \
    (echo "HashTableTemplateTest test1  Failed" >> test_results) && \
HashTableTemplateTest test2 && \
    (echo "HashTableTemplateTest test2  OK" >> test_results) || \
    (echo "HashTableTemplateTest test2  Failed" >> test_results) && \
HashTableTemplateTest test3 && \
    (echo "HashTableTemplateTest test3  OK" >> test_results) || \
    (echo "HashTableTemplateTest test3  Failed" >> test_results) && \
HashTableTemplateTest test4 && \
    (echo "HashTableTemplateTest test4  OK" >> test_results) || \
    (echo "HashTableTemplateTest test4  Failed" >> test_results) && \
HashTableTemplateTest test5 && \
    (echo "HashTableTemplateTest test5  OK" >> test_results) || \
    (echo "HashTableTemplateTest test5  Failed" >> test_results) && \
HashTableTemplateTest test6 && \
    (echo "HashTableTemplateTest test6  OK" >> test_results) || \
    (echo "HashTableTemplateTest test6  Failed" >> test_results) && \
HashTableVoidTest test1 && \
    (echo "HashTableVoidTest test1  OK" >> test_results) || \
    (echo "HashTableVoidTest test1  Failed" >> test_results) && \
HashTableVoidTest test2 && \
    (echo "HashTableVoidTest test2  OK" >> test_results) || \
    (echo "HashTableVoidTest test2  Failed" >> test_results) && \
HashTableVoidTest test3 && \
    (echo "HashTableVoidTest test3  OK" >> test_results) || \
    (echo "HashTableVoidTest test3  Failed" >> test_results) && \
HashTableVoidTest test4 && \
    (echo "HashTableVoidTest test4  OK" >> test_results) || \
    (echo "HashTableVoidTest test4  Failed" >> test_results) && \
HashTableVoidTest test5 && \
    (echo "HashTableVoidTest test5  OK" >> test_results) || \
    (echo "HashTableVoidTest test5  Failed" >> test_results) && \
HashTableVoidTest test6 && \
    (echo "HashTableVoidTest test6  OK" >> test_results) || \
    (echo "HashTableVoidTest test6  Failed" >> test_results) && \
(wcVoid greetings.txt | sort > out1) && (wcVoidExample greetings.txt | sort > out2) && \
    diff out1 out2 && \
    (echo "wcVoid greetings.txt OK" >> test_results) || \
    (echo "wcVoid greetings.txt Failed" >> test_results) && \
(wcTemplate greetings.txt | sort > out1) && (wcVoidExample greetings.txt | sort > out2) && \
    diff out1 out2 && \
    (echo "wcTemplate greetings.txt OK" >> test_results) || \
    (echo "wcTemplate greetings.txt Failed" >> test_results) && \
echo && \
echo ------ Test Results ----- && \
cat test_results 

clean:
rm -f core *.o HashTableTemplateTest HashTableVoidTest ListTemplateTest \
wcVoid wcTemplate out1 out2 test_results

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:43:14+00:00Added an answer on May 20, 2026 at 11:43 pm

    First of all, change it to a DOS batch file.

    test:
    del /Q /F test_results
    
    ListTemplateTest 
    if NOT ERRORLEVEL 1
        echo "ListTemplateTest OK" >> test_results
    if ERRORLEVEL 1
        echo "ListTemplateTest Failed" >> test_results
    
    HashTableTemplateTest test1
    if NOT ERRORLEVEL 1
        echo "HashTableTemplateTest test1  OK" >> test_results
    if ERRORLEVEL 1
        echo "HashTableTemplateTest test1  Failed" >> test_results
    
    etc ...
    

    Now, in Visual Studio

    • Right click on the project name
    • Select “Properties” from the menu.
    • In the property tree select
      • Configuration Properties
        • Build Events
          • Post-Build Event
    • Put your batch file in as the “Command Line”

    That should do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, in order to provide full disclosure, I want to point out that this
Full disclosure : This is for a homework assignment. This is driving me nuts.
How would you define testing? In the interest of full disclosure, I'm posting this
First off, full disclosure: This is going towards a uni assignment, so I don't
Full disclosure: this issue is duplicated on the ggplot2 google group I'm developing a
Full disclosure, this is part of a homework assignment (though a small snippet, the
full disclosure - this is for a homework assignment. And I normally would not
Full disclosure, I'm new to Visual Studio Web Tests and coding for them. I've
Full disclaimer: I'm a CS student, and this question is related to a recently
The full error I'm getting is this: error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.